Преглед на файлове

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

shizhongming преди 2 години
родител
ревизия
db1fb45d47
променени са 1 файла, в които са добавени 5 реда и са изтрити 5 реда
  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>