The vue keepalive page is not cached. Mounted and activated hooks are called every time you enter the page.

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

Mar.13,2021

the name property of your setting component is not set in the route, but can only be set in the component

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb30ab-2424.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb30ab-2424.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?