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
|
@@ -59,24 +59,20 @@ export default {
|
|
|
59
59
|
},
|
|
60
60
|
// 右侧下拉菜单
|
|
61
61
|
defaultUserDropdown() {
|
|
62
|
-
const {
|
|
63
|
-
|
|
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
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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"
|
|
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
|
-
|
|
187
|
-
|
|
186
|
+
// 首页菜单的特殊处理
|
|
187
|
+
if (!menu.children[0].children) {
|
|
188
|
+
return this.renderSingleMenu(h, menu.children[0], depth, true);
|
|
188
189
|
}
|
|
189
190
|
//弹出菜单显示父级信息;
|
|
190
191
|
// 这里认为父级的深度应该+1
|
package/src/style/var.scss
CHANGED