zmdms-webui 3.3.0 → 3.3.1
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.
|
@@ -70,15 +70,17 @@ var MainMenu = function (props) {
|
|
|
70
70
|
filterMenus = filterMenuHandle(filterMenus);
|
|
71
71
|
}
|
|
72
72
|
return filterMenus.map(function (userMenu) {
|
|
73
|
+
var _a;
|
|
73
74
|
return {
|
|
74
75
|
label: getLabel(userMenu),
|
|
75
|
-
title: userMenu.name,
|
|
76
|
+
title: (_a = userMenu.name) === null || _a === void 0 ? void 0 : _a.trim(),
|
|
76
77
|
key: userMenu.id,
|
|
77
78
|
icon: userMenu.source ? (jsx(IconFont, { type: userMenu.source, style: { fontSize: "18px" } })) : null,
|
|
78
79
|
};
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
82
|
return userMenus.map(function (userMenu) {
|
|
83
|
+
var _a, _b;
|
|
82
84
|
var children = userMenu.children;
|
|
83
85
|
var filterMenus = [];
|
|
84
86
|
if (children) {
|
|
@@ -88,17 +90,22 @@ var MainMenu = function (props) {
|
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
return {
|
|
91
|
-
label: jsx("span", __assign({ title: userMenu.name }, { children: userMenu.name })),
|
|
92
|
-
title: userMenu.name,
|
|
93
|
+
label: jsx("span", __assign({ title: (_a = userMenu.name) === null || _a === void 0 ? void 0 : _a.trim() }, { children: userMenu.name })),
|
|
94
|
+
title: (_b = userMenu.name) === null || _b === void 0 ? void 0 : _b.trim(),
|
|
93
95
|
key: userMenu.id,
|
|
94
96
|
icon: userMenu.source ? (jsx(IconFont, { type: userMenu.source, style: { fontSize: "18px" } })) : null,
|
|
95
97
|
children: children
|
|
96
98
|
? filterMenus.map(function (item) {
|
|
99
|
+
var _a;
|
|
97
100
|
return {
|
|
98
101
|
label: getLabel(item),
|
|
99
|
-
title: item.name,
|
|
102
|
+
title: (_a = item.name) === null || _a === void 0 ? void 0 : _a.trim(),
|
|
100
103
|
key: item.id,
|
|
101
|
-
icon: item.source ? (jsx(IconFont, { type: item.source, style: { fontSize: "18px" } })) :
|
|
104
|
+
icon: item.source ? (jsx(IconFont, { type: item.source, style: { fontSize: "18px" } })) : (jsx("span", { style: {
|
|
105
|
+
fontSize: "18px",
|
|
106
|
+
display: "inline-block",
|
|
107
|
+
width: "1em",
|
|
108
|
+
} })),
|
|
102
109
|
};
|
|
103
110
|
})
|
|
104
111
|
: null,
|
|
@@ -42,7 +42,6 @@ var SubMenu = function (props, ref) {
|
|
|
42
42
|
getNewPath: getNewPath,
|
|
43
43
|
userMenus: userMenus,
|
|
44
44
|
}), subMenuOpenKeys = _c.subMenuOpenKeys, onSubMenuOpenChange = _c.onSubMenuOpenChange;
|
|
45
|
-
console.log(subMenuOpenKeys);
|
|
46
45
|
// 如果是搜索或者收藏 把二级菜单都展开
|
|
47
46
|
useEffect(function () {
|
|
48
47
|
if (mainMenuSelectedKeys && mainMenuSelectedKeys.length > 0) {
|
|
@@ -193,7 +192,7 @@ var SubMenu = function (props, ref) {
|
|
|
193
192
|
"zmdms-menu--sub-hide-bg": hideSubMenuBg,
|
|
194
193
|
"zmdms-menu--sub-item-line": subMenuItemLine,
|
|
195
194
|
});
|
|
196
|
-
return (jsx(Drawer, __assign({ mask: false, placement: "left", width: subMenuWidth, zIndex: 101, closable: false, open: visible, className: classes, style: { marginLeft: marginLeft }, footer: footerDom, title: subMenuLogo ? (jsx("img", { src: subMenuLogo, title: "\u4EBA\u529B\u8D44\u6E90\u7CFB\u7EDF", alt: "cico_logo" })) : (jsx("div", {})) }, { children: jsx(Menu, { inlineIndent: 5, selectedKeys: subMenusSelectedKeys, mode: "inline", items: items, openKeys: subMenuOpenKeys, onOpenChange: onSubMenuOpenChange }) })));
|
|
195
|
+
return (jsx(Drawer, __assign({ mask: false, placement: "left", width: subMenuWidth, zIndex: 101, closable: false, open: visible, className: classes, style: { marginLeft: marginLeft }, footer: footerDom, title: subMenuLogo ? (jsx("img", { src: subMenuLogo, title: "\u4EBA\u529B\u8D44\u6E90\u7CFB\u7EDF", alt: "cico_logo" })) : (jsx("div", {})), getContainer: process.env.NODE_ENV === 'development' ? false : undefined }, { children: jsx(Menu, { inlineIndent: 5, selectedKeys: subMenusSelectedKeys, mode: "inline", items: items, openKeys: subMenuOpenKeys, onOpenChange: onSubMenuOpenChange }) })));
|
|
197
196
|
};
|
|
198
197
|
var SubMenu$1 = memo(forwardRef(SubMenu));
|
|
199
198
|
|