瀏覽代碼

Merge tag 'Hotfix-zh-72' into develop

Finish Hotfix-zh-72
howie 3 年之前
父節點
當前提交
adaeb8dc50
共有 2 個文件被更改,包括 4 次插入5 次删除
  1. 2 3
      src/layout/components/AppMain.vue
  2. 2 2
      src/layout/components/TagsView/index.vue

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

@@ -1,9 +1,9 @@
 <template>
 <template>
   <section class="app-main">
   <section class="app-main">
     <transition name="fade-transform" mode="out-in">
     <transition name="fade-transform" mode="out-in">
-
+      <keep-alive>
         <router-view />
         <router-view />
-
+      </keep-alive>
     </transition>
     </transition>
   </section>
   </section>
 </template>
 </template>
@@ -13,7 +13,6 @@ export default {
   name: "AppMain",
   name: "AppMain",
   computed: {
   computed: {
     cachedViews() {
     cachedViews() {
-
       return this.$store.state.tagsView.cachedViews;
       return this.$store.state.tagsView.cachedViews;
     },
     },
     key() {
     key() {

+ 2 - 2
src/layout/components/TagsView/index.vue

@@ -2,9 +2,9 @@
   <div id="tags-view-container" class="tags-view-container">
   <div id="tags-view-container" class="tags-view-container">
     <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
     <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
       <router-link
       <router-link
-        v-for="tag in visitedViews"
+        v-for="(tag,index) in visitedViews"
         ref="tag"
         ref="tag"
-        :key="tag.path"
+        :key="tag.path+index"
         :class="isActive(tag)?'active':''"
         :class="isActive(tag)?'active':''"
         :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
         :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
         tag="span"
         tag="span"