qdt-admin-layout 1.0.4 → 1.0.8
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,15 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<li :class="className" :style="paddingStyle" @click="handleClick">
|
|
3
|
-
<
|
|
4
|
-
<div :style="iconContainerStyle">
|
|
5
|
-
<slot />
|
|
6
|
-
</div>
|
|
7
|
-
<template v-slot:content>
|
|
8
|
-
<slot name="title" />
|
|
9
|
-
</template>
|
|
10
|
-
</el-tooltip>
|
|
11
|
-
|
|
12
|
-
<template v-else>
|
|
3
|
+
<template>
|
|
13
4
|
<slot />
|
|
14
5
|
<slot name="title" />
|
|
15
6
|
</template>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
//TODO header会在head-menu渲染后再次渲染,初步排查是head-menu中的activeMenu改变所致
|
|
7
|
-
import { appGetters, headerGetters } from "../../store";
|
|
7
|
+
import { appGetters, headerGetters, headerMutations } from "../../store";
|
|
8
8
|
import Logo from "../../component/Logo";
|
|
9
9
|
import Hamburger from "../../component/Hamburger";
|
|
10
10
|
import HorizontalResizableMenu from "../../component/HorizontalResizableMenu";
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
!appGetters.isMobile &&
|
|
26
26
|
appGetters.showLogo &&
|
|
27
27
|
(appGetters.navMode === "head" || appGetters.struct === "top-bottom");
|
|
28
|
-
return renderLogo && <Logo
|
|
28
|
+
return renderLogo && <Logo />;
|
|
29
29
|
},
|
|
30
30
|
// 左侧汉堡包
|
|
31
31
|
defaultHamburger() {
|
|
@@ -64,7 +64,7 @@ export default {
|
|
|
64
64
|
logout = {},
|
|
65
65
|
message = {},
|
|
66
66
|
userinfo = {},
|
|
67
|
-
} =
|
|
67
|
+
} = headerMutations;
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
70
|
<div class="user-dropdown-reference">
|
|
@@ -102,16 +102,28 @@ export default {
|
|
|
102
102
|
return slot ? slot(h, { menu, depth }) : <span>{menu.meta.title}</span>;
|
|
103
103
|
},
|
|
104
104
|
// 渲染无子级的菜单
|
|
105
|
-
renderSingleMenu(h, menu, depth) {
|
|
105
|
+
renderSingleMenu(h, menu, depth, needlogo) {
|
|
106
106
|
const { fullPath } = menu;
|
|
107
107
|
return (
|
|
108
108
|
<MenuItem
|
|
109
109
|
key={fullPath}
|
|
110
110
|
index={fullPath}
|
|
111
|
+
style={
|
|
112
|
+
needlogo &&
|
|
113
|
+
"height:88px;text-align:center;padding:0;line-height:normal"
|
|
114
|
+
}
|
|
111
115
|
inline-indent={this.inlineIndent}
|
|
112
116
|
>
|
|
113
117
|
<template slot="title">
|
|
114
|
-
{
|
|
118
|
+
{needlogo && (
|
|
119
|
+
<div style="padding:5% 0 ">
|
|
120
|
+
<div style="padding: 10% 0;">
|
|
121
|
+
{this.renderMenuIcon(h, menu, depth)}
|
|
122
|
+
<div>{menu.meta.title}</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
)}
|
|
126
|
+
{!needlogo && this.renderMenuContent(h, menu, depth)}
|
|
115
127
|
</template>
|
|
116
128
|
</MenuItem>
|
|
117
129
|
);
|
|
@@ -171,6 +183,9 @@ export default {
|
|
|
171
183
|
renderMenus(h, menus, depth = 1) {
|
|
172
184
|
return menus.map((menu) => {
|
|
173
185
|
let children = [];
|
|
186
|
+
if (!menu.children) {
|
|
187
|
+
return this.renderSingleMenu(h, menu, depth, true);
|
|
188
|
+
}
|
|
174
189
|
//弹出菜单显示父级信息;
|
|
175
190
|
// 这里认为父级的深度应该+1
|
|
176
191
|
children = this.renderChildrenWithParentMenu(
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
.menu-display {
|
|
2
2
|
margin-left: 5px;
|
|
3
|
-
|
|
4
|
-
border-left: 1px solid rgb(228, 231, 237);
|
|
5
|
-
}
|
|
3
|
+
|
|
6
4
|
ul:first-child {
|
|
7
5
|
border: none;
|
|
8
6
|
}
|
|
@@ -22,7 +20,8 @@
|
|
|
22
20
|
// 菜单图标
|
|
23
21
|
.menu-icon {
|
|
24
22
|
color: inherit;
|
|
25
|
-
font-size:
|
|
23
|
+
font-size: 34px;
|
|
24
|
+
margin-bottom: 10px;
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
// 子级菜单激活时,父级同样高亮
|