qdt-admin-layout 1.1.9 → 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.9",
3
+ "version": "1.1.11",
4
4
  "description": "基于element-ui的后台管理layout的管家婆改版",
5
5
  "main": "src/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -77,7 +77,9 @@ export default {
77
77
  class="el-icon-download header-icon"
78
78
  on-click={dowload}
79
79
  />
80
- <span class="username">下载</span>
80
+ <span class="username" on-click={dowload}>
81
+ 下载
82
+ </span>
81
83
  <span class="username shu">|</span>
82
84
 
83
85
  <i
@@ -111,6 +111,7 @@ export default {
111
111
  // 渲染无子级的菜单
112
112
  renderSingleMenu(h, menu, depth, needlogo) {
113
113
  const { fullPath } = menu;
114
+ if (fullPath === "/index") return "";
114
115
  return (
115
116
  <MenuItem
116
117
  key={fullPath}
@@ -1,11 +1,9 @@
1
1
  .menu-display {
2
+ display: flex;
2
3
  margin-left: 5px;
3
4
  border-radius: 2px;
4
- -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0 , 0.15);
5
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0 , 0.15);
6
- ul {
7
- border-right: 1px solid rgb(228, 231, 237);
8
- }
5
+ -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
6
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
9
7
  ul:last-child {
10
8
  border: none;
11
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;
@@ -13,6 +13,9 @@ const state = {
13
13
  // 用户名称
14
14
  username: '',
15
15
 
16
+ // 公司名称
17
+ companyName: '',
18
+
16
19
  // 下拉菜单项,{icon:图标, content:菜单内容, handler:点击时触发的方法}
17
20
  dropdownItems: [],
18
21
 
@@ -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
  },