qdt-admin-layout 1.1.25 → 1.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qdt-admin-layout",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "基于element-ui的后台管理layout的管家婆改版",
5
5
  "main": "src/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -73,22 +73,21 @@ export const mutations = {
73
73
  if (isEmpty(view.meta.title)) {
74
74
  return
75
75
  }
76
-
77
76
  const key = getRouterKey(view)
78
-
79
77
  if (store.visitedViews.some(v => v.key === key || v.key === view.meta.mainRoute)) {
80
78
  return
81
79
  }
80
+ // 增加key属性
81
+ store.visitedViews.push({ ...view, key })
82
+
82
83
  const index = store.visitedViews.findIndex(item => item.fullPath.includes('xsgzt'));
83
84
  const xsgztCount = store.visitedViews.filter(item =>
84
85
  item.fullPath.includes('xsgzt')
85
86
  ).length;
86
87
  // 如果存在则删除
87
- if (index !== -1 && xsgztCount > 0) {
88
+ if (index !== -1 && xsgztCount > 1) {
88
89
  store.visitedViews.splice(index, 1);
89
90
  }
90
- // 增加key属性
91
- store.visitedViews.push({ ...view, key })
92
91
  },
93
92
 
94
93
  /**