Jelajahi Sumber

MultiTab bug修复 切换页签不需关掉子页面

chenrui 3 tahun lalu
induk
melakukan
af85db4330
1 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 3 2
      src/components/MultiTab/MultiTab.vue

+ 3 - 2
src/components/MultiTab/MultiTab.vue

@@ -140,11 +140,12 @@ export default {
     },
     activeKey: function (newPathKey) {
       const row = this.pages.find(item => item.name == newPathKey)
-      // console.log(row.fullPath)
+      // console.log(row, '+++', row.fullPath)
       if (row.fullPath.indexOf('/list') == -1) {
         this.$router.push({ path: row.fullPath })
       } else {
-        this.$router.push({ path: row.fullPath, query: { closeLastOldTab: true } })
+        // this.$router.push({ path: row.fullPath, query: { closeLastOldTab: true } })  //  需求:切换页签需关掉子页面
+        this.$router.push({ path: row.path }) //  需求:切换页签不需关掉子页面
       }
     }
   },