@flatbiz/pro-layout 5.2.11 → 5.2.13
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 -1
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -309,7 +309,7 @@ export type BootstrapOptions = {
|
|
|
309
309
|
*/
|
|
310
310
|
accountOperateMenuItems?: MenuProps["items"];
|
|
311
311
|
/** 面包屑起始标题 */
|
|
312
|
-
breadTitle?: string | ReactElement;
|
|
312
|
+
breadTitle?: string | string[] | ReactElement;
|
|
313
313
|
/** 面包屑位置功能扩展 */
|
|
314
314
|
breadExtendRender?: ReactElement;
|
|
315
315
|
/** 隐藏默认设置的面包屑,默认值false */
|
package/dist/index.js
CHANGED
|
@@ -866,9 +866,14 @@ var Bread = function Bread(props) {
|
|
|
866
866
|
var globalData = getGlobalData();
|
|
867
867
|
var breadRoutes = useBread(ctx.breads || {}, globalData.routeBaseName);
|
|
868
868
|
var breadcrumbItems = useMemo(function () {
|
|
869
|
-
var
|
|
869
|
+
var titleItems = Array.isArray(ctx.breadTitle) ? ctx.breadTitle.map(function (title) {
|
|
870
|
+
return {
|
|
871
|
+
title: title
|
|
872
|
+
};
|
|
873
|
+
}) : ctx.breadTitle ? [{
|
|
870
874
|
title: ctx.breadTitle
|
|
871
875
|
}] : [];
|
|
876
|
+
var items = _toConsumableArray(titleItems);
|
|
872
877
|
var routes = breadRoutes.sort(function (a, b) {
|
|
873
878
|
return a.path.length - b.path.length;
|
|
874
879
|
});
|
|
@@ -2548,7 +2553,7 @@ var MenuNoChildrenTextView = function MenuNoChildrenTextView(props) {
|
|
|
2548
2553
|
|
|
2549
2554
|
var Sider = Layout.Sider;
|
|
2550
2555
|
var SiderBar = function SiderBar() {
|
|
2551
|
-
var _layoutCtx$sidebarThe, _layoutCtx$sidebarThe2, _layoutCtx$sidebarThe3, _layoutCtx$sidebarThe4, _layoutCtx$
|
|
2556
|
+
var _layoutCtx$sidebarThe, _layoutCtx$sidebarThe2, _layoutCtx$sidebarThe3, _layoutCtx$sidebarThe4, _layoutCtx$sidebarThe5, _layoutCtx$sidebarThe6, _layoutCtx$sidebarThe7, _layoutCtx$sidebarThe8, _layoutCtx$sidebarThe9, _layoutCtx$sidebarThe0, _layoutCtx$sidebarThe1, _layoutCtx$sidebarThe10, _layoutCtx$sidebarThe11, _layoutCtx$sidebarThe12, _layoutCtx$sidebarThe13;
|
|
2552
2557
|
var _useState = useState(),
|
|
2553
2558
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2554
2559
|
searchValue = _useState2[0],
|
|
@@ -2822,13 +2827,14 @@ var SiderBar = function SiderBar() {
|
|
|
2822
2827
|
trailing: false
|
|
2823
2828
|
}),
|
|
2824
2829
|
onMouseEnter = _useDebounceFn.run;
|
|
2825
|
-
console.log('layoutCtx', layoutCtx.opendKeys, (_layoutCtx$siderBarMe2 = layoutCtx.siderBarMenuActiveItem) === null || _layoutCtx$siderBarMe2 === void 0 ? void 0 : _layoutCtx$siderBarMe2.id);
|
|
2826
2830
|
var onChangeTargetKeys = useMemoizedFn(function (activeId) {
|
|
2827
2831
|
var parentsList = treeNodeParentsList(activeId, menusTreeListNew || [], false, {
|
|
2828
2832
|
value: 'id',
|
|
2829
2833
|
children: 'children'
|
|
2830
2834
|
});
|
|
2831
|
-
layoutCtx.onChangeOpendKeys(parentsList)
|
|
2835
|
+
layoutCtx.onChangeOpendKeys(parentsList.map(function (item) {
|
|
2836
|
+
return String(item);
|
|
2837
|
+
}));
|
|
2832
2838
|
});
|
|
2833
2839
|
return /*#__PURE__*/jsxs(Sider, {
|
|
2834
2840
|
theme: "light",
|
|
@@ -2872,8 +2878,8 @@ var SiderBar = function SiderBar() {
|
|
|
2872
2878
|
},
|
|
2873
2879
|
children: /*#__PURE__*/jsx(IconWrapper, {
|
|
2874
2880
|
onClick: function onClick() {
|
|
2875
|
-
var _layoutCtx$
|
|
2876
|
-
var activeId = (_layoutCtx$
|
|
2881
|
+
var _layoutCtx$siderBarMe2, _layoutCtx$opendKeys;
|
|
2882
|
+
var activeId = (_layoutCtx$siderBarMe2 = layoutCtx.siderBarMenuActiveItem) === null || _layoutCtx$siderBarMe2 === void 0 ? void 0 : _layoutCtx$siderBarMe2.id;
|
|
2877
2883
|
if (!activeId) {
|
|
2878
2884
|
layoutCtx.onChangeOpendKeys([]);
|
|
2879
2885
|
return;
|