@litianxiang/portal-core 0.2.4 → 0.2.5
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/dist/index.d.ts +1 -0
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -101,6 +101,7 @@ function transformMenuTree(menuList, options) {
|
|
|
101
101
|
icon: item?.icon,
|
|
102
102
|
order_num: item?.order_num,
|
|
103
103
|
site: item?.site ?? defaultSite,
|
|
104
|
+
is_blank_page: item?.is_blank_page,
|
|
104
105
|
children
|
|
105
106
|
};
|
|
106
107
|
});
|
|
@@ -117,6 +118,7 @@ function buildAllMenuTree(menuList) {
|
|
|
117
118
|
icon: item.icon,
|
|
118
119
|
order_num: item.order_num,
|
|
119
120
|
site: item.site,
|
|
121
|
+
is_blank_page: item.is_blank_page,
|
|
120
122
|
children: item.children && item.children.length > 0 ? buildAllMenuTree(item.children) : []
|
|
121
123
|
});
|
|
122
124
|
}
|
|
@@ -135,6 +137,7 @@ function buildPageMenuList(menuList) {
|
|
|
135
137
|
icon: item.icon,
|
|
136
138
|
order_num: item.order_num,
|
|
137
139
|
site: item.site,
|
|
140
|
+
is_blank_page: item.is_blank_page,
|
|
138
141
|
children: item.children ? buildPageMenuList(item.children) : []
|
|
139
142
|
});
|
|
140
143
|
} else if (item.children && item.children.length > 0) {
|
|
@@ -150,6 +153,7 @@ function buildPageMenuList(menuList) {
|
|
|
150
153
|
icon: child.icon,
|
|
151
154
|
order_num: child.order_num,
|
|
152
155
|
site: child.site,
|
|
156
|
+
is_blank_page: child.is_blank_page,
|
|
153
157
|
children: child.children
|
|
154
158
|
});
|
|
155
159
|
}
|
|
@@ -1006,9 +1010,12 @@ function createMenuUserGetters() {
|
|
|
1006
1010
|
isMenuLoaded: (state) => state.menuLoaded
|
|
1007
1011
|
};
|
|
1008
1012
|
}
|
|
1013
|
+
function isBlankPageMenu(item) {
|
|
1014
|
+
return item?.is_blank_page === true || item?.is_blank_page === "true" || item?.is_blank_page === 1;
|
|
1015
|
+
}
|
|
1009
1016
|
function filterSidebarMenu(menus, options) {
|
|
1010
1017
|
const exclude = options?.excludeCategories ?? ["button", "flow-module", "flow-page"];
|
|
1011
|
-
return (menus || []).filter((item) => !exclude.includes(item?.category)).map((item) => ({
|
|
1018
|
+
return (menus || []).filter((item) => !exclude.includes(item?.category) && !isBlankPageMenu(item)).map((item) => ({
|
|
1012
1019
|
...item,
|
|
1013
1020
|
children: item.children && item.children.length > 0 ? filterSidebarMenu(item.children, options) : []
|
|
1014
1021
|
}));
|