qdt-admin-layout 1.1.10 → 1.1.11

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.10",
3
+ "version": "1.1.11",
4
4
  "description": "基于element-ui的后台管理layout的管家婆改版",
5
5
  "main": "src/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -4,9 +4,6 @@
4
4
  border-radius: 2px;
5
5
  -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
6
6
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
7
- ul {
8
- border-right: 1px solid rgb(228, 231, 237);
9
- }
10
7
  ul:last-child {
11
8
  border: none;
12
9
  }
@@ -70,10 +70,8 @@ export default {
70
70
  $route(to, from) {
71
71
  tagsViewGetters.enableChangeTransition &&
72
72
  this.decideRouteTransition(to, from);
73
-
74
73
  // 如果是刷新的话,不需要进行后续操作
75
74
  if (isRedirectRouter(to)) return;
76
-
77
75
  this.setActiveKey(to);
78
76
  this.addTag(to);
79
77
  this.$nextTick(this.moveToCurrentTag);
@@ -181,7 +179,6 @@ export default {
181
179
  */
182
180
  closeSelectedTag(view = this.selectedTag) {
183
181
  if (tagsViewGetters.visitedViews.length <= 1 || isAffix(view)) return;
184
-
185
182
  tagsViewMutations.delTagAndCache(view);
186
183
  this.activeKey === view.key && this.gotoLastTag();
187
184
  },
@@ -217,8 +214,8 @@ export default {
217
214
  renderTags() {
218
215
  const { $createElement: h, $router, activeKey } = this;
219
216
  const { itemSlot, visitedViews } = tagsViewGetters;
220
- const renderFn = itemSlot || renderDefaultStyleTag;
221
217
 
218
+ const renderFn = itemSlot || renderDefaultStyleTag;
222
219
  return visitedViews.map((view) => {
223
220
  const active = activeKey === view.key;
224
221
  const showClose = !isAffix(view) && visitedViews.length > 1;
@@ -91,13 +91,11 @@ export const mutations = {
91
91
  */
92
92
  addCacheOnly(view) {
93
93
  const { noCache } = view.meta
94
-
95
94
  const key = getRouterKey(view)
96
95
 
97
96
  if (noCache === true || store.cachedViews.includes(key)) {
98
97
  return
99
98
  }
100
-
101
99
  store.cachedViews.push(key)
102
100
  },
103
101
 
@@ -139,6 +137,10 @@ export const mutations = {
139
137
  * @param view {View}
140
138
  */
141
139
  delTagAndCache(view) {
140
+ try {
141
+ let { q = "" } = view.query;
142
+ if (q) window.sessionStorage.removeItem(q)
143
+ } catch (error) { }
142
144
  mutations.delTagOnly(view)
143
145
  mutations.delCacheOnly(view)
144
146
  },