Ver Fonte

fix(架构): 修复SmartPageProvider导致keep-alive失效的问题

shizhongming há 2 anos atrás
pai
commit
db1fb45d47
1 ficheiros alterados com 5 adições e 5 exclusões
  1. 5 5
      src/layouts/page/index.vue

+ 5 - 5
src/layouts/page/index.vue

@@ -14,12 +14,12 @@
         mode="out-in"
         appear
       >
-        <keep-alive v-if="openCache" :include="getCaches">
-          <SmartPageProvider>
+        <SmartPageProvider>
+          <keep-alive v-if="openCache" :include="getCaches">
             <component :is="Component" :key="route.fullPath" />
-          </SmartPageProvider>
-        </keep-alive>
-        <component v-else :is="Component" :key="route.fullPath" />
+          </keep-alive>
+          <component v-else :is="Component" :key="route.fullPath" />
+        </SmartPageProvider>
       </transition>
     </template>
   </RouterView>