current position:Home>Why does Vue route jump refresh the page?

Why does Vue route jump refresh the page?

2022-04-29 17:46:14segmentfault

…
{
    path: '/index',
    name: 'Home',
    component: Layout,
    redirect: '/list',
    children: [
      {
        path: 'list',
        name: 'DataList',
        component: () => import('@/views/data/index'),
        meta: {
          keepAlive: true
        }
      },
      {
        path: 'sub',
        name: 'TopicSubs',
        component: () => import('@/views/Data/Sub'),
        meta: {
          keepAlive: true
        }
      },
      {
        path: 'details',
        name: 'DataView',
        component: () => import('@/views/Data/details')
      }
    ]
  },
…

History Pattern , The routing configuration is as above

Get into /index automatically redirect To /index/list ( Or go directly to /index/list )

stay list Load page data in the page hook method , Then through the list router-link Components are routed to /index/sub

This is the time , Why does the page seem to refresh , It's the console network It will be emptied , Reload sub Page request , from sub Enter into /index/details Will not be …

This is the from details Page back to sub page , Not refresh , from sub Back to list , Will refresh …



Other answers 1:

This is the same as your page activated Function related ?

copyright notice
author[segmentfault],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/115/202204251143336935.html

Random recommended