前端

vue keep-alive

2019-11-07  本文已影响0人  是嘻嘻呀
      <transition name="routerView">
         <keep-alive>
            <router-view v-if="$route.meta.keepAlive"></router-view>
          </keep-alive>
        </transition>
        <transition name="routerView">
          <router-view v-if="!$route.meta.keepAlive"></router-view>
        </transition>
      {
          path: 'users',
            name: 'users',
            meta: {title: '用户管理',  keepAlive: true},//需要缓存
            component: () => import ('@/views/system/organization/users')
          },
上一篇 下一篇

猜你喜欢

热点阅读