Parcourir la source

fix 修复 从无缓存页面切换到有缓存页面 缓存失效问题

疯狂的狮子Li il y a 10 mois
Parent
commit
48b5d595df
1 fichiers modifiés avec 2 ajouts et 5 suppressions
  1. 2 5
      src/layout/components/AppMain.vue

+ 2 - 5
src/layout/components/AppMain.vue

@@ -1,14 +1,11 @@
 <template>
   <section class="app-main">
     <router-view v-slot="{ Component, route }">
-      <transition v-if="!route.meta.noCache" :enter-active-class="animate" mode="out-in">
-        <keep-alive v-if="!route.meta.noCache" :include="tagsViewStore.cachedViews">
+      <transition :enter-active-class="animate" mode="out-in">
+        <keep-alive :include="tagsViewStore.cachedViews">
           <component :is="Component" v-if="!route.meta.link" :key="route.path" />
         </keep-alive>
       </transition>
-      <transition v-if="route.meta.noCache" :enter-active-class="animate" mode="out-in">
-        <component :is="Component" v-if="!route.meta.link && route.meta.noCache" :key="route.path" />
-      </transition>
     </router-view>
     <iframe-toggle />
   </section>