qdt-admin-layout 1.0.8 → 1.1.2

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.0.8",
3
+ "version": "1.1.2",
4
4
  "description": "基于element-ui的后台管理layout的管家婆改版",
5
5
  "main": "src/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -59,24 +59,20 @@ export default {
59
59
  },
60
60
  // 右侧下拉菜单
61
61
  defaultUserDropdown() {
62
- const {
63
- username,
64
- logout = {},
65
- message = {},
66
- userinfo = {},
67
- } = headerMutations;
62
+ const { logout = {}, message = {}, userinfo = {} } = headerMutations;
63
+ const { username } = headerGetters;
68
64
 
69
65
  return (
70
66
  <div class="user-dropdown-reference">
71
- <el-avatar
72
- size={28}
73
- src={headerGetters.avatar}
74
- icon="el-icon-user-solid"
75
- />
67
+ <span on-click={userinfo}>
68
+ <el-avatar
69
+ size={28}
70
+ src={headerGetters.avatar}
71
+ icon="el-icon-user-solid"
72
+ />
73
+ </span>
76
74
  {!isEmpty(username) && (
77
- <span class="username hide-on-mobile" on-click={userinfo}>
78
- {username}
79
- </span>
75
+ <span on-click={userinfo} class="username hide-on-mobile">{username}</span>
80
76
  )}
81
77
 
82
78
  <span class="username shu">|</span>
@@ -183,8 +183,9 @@ export default {
183
183
  renderMenus(h, menus, depth = 1) {
184
184
  return menus.map((menu) => {
185
185
  let children = [];
186
- if (!menu.children) {
187
- return this.renderSingleMenu(h, menu, depth, true);
186
+ // 首页菜单的特殊处理
187
+ if (!menu.children[0].children) {
188
+ return this.renderSingleMenu(h, menu.children[0], depth, true);
188
189
  }
189
190
  //弹出菜单显示父级信息;
190
191
  // 这里认为父级的深度应该+1
@@ -1,3 +1,11 @@
1
+
2
+ //覆盖element颜色
3
+ $--color-primary: #f57446;
4
+ $--color-success: #21ba45;
5
+ $--color-warning: #ff5722;
6
+ $--color-danger: #f44336;
7
+ $--color-info: #909399;
8
+
1
9
  @import "~element-ui/packages/theme-chalk/src/common/var.scss";
2
10
 
3
11
  //移动端的最大宽度