the requirement is that the page will not be refreshed every time you enter the page, such as content, but the page will be refreshed regardless of whether it is switching routes or moving forward and backward.
routing configuration:
mode:"history",
routes: [
{
path: "/",
redirect:"/content",
component: home,
children:[
// hashcontent
{path:"/about", name:"about", component:about,meta:{keepAlive:true}},
{path:"/archives",name:"archives",component:archives,meta:{keepAlive:true}},
{path:"/content",name:"content",component:content,meta:{keepAlive:true}},
{path:"/article:_id",name:"article",component:article,meta:{keepAlive:true}}//namename
]
},
root component
< div id= "app" >
<!-- APPvue -->
<loading v-show="isloading"></loading>
<router-view></router-view>
</div>
home components