瀏覽代碼

菜单路由记录,优化keep-alive缓存

ZaiZai 2 年之前
父節點
當前提交
0242b47871
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/layout/index.vue

+ 2 - 2
src/layout/index.vue

@@ -43,8 +43,8 @@
             <el-main class="hc-main-box" id="hc-main-box">
                 <router-view v-slot="{ Component }" v-if="reloadRouter">
                     <transition name="fade-transform">
-                        <keep-alive include="ProductList">
-                            <component :is="Component"  :msgCount="msgCount"/>
+                        <keep-alive :max="10" exclude="home,home-index,home-config">
+                            <component :is="Component" :msgCount="msgCount"/>
                         </keep-alive>
                     </transition>
                 </router-view>