@zat-design/sisyphus-react 3.9.7 → 3.9.8-beta.10
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.esm.css +6 -5
- package/dist/less.esm.css +6 -5
- package/es/ProAction/index.js +5 -5
- package/es/ProDownload/index.d.ts +1 -1
- package/es/ProDownload/index.js +3 -3
- package/es/ProDownload/utils.js +3 -3
- package/es/ProDrawerForm/components/ProDrawer/index.js +4 -4
- package/es/ProDrawerForm/components/ProModal/index.js +3 -3
- package/es/ProEditLabel/index.js +3 -3
- package/es/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/es/ProEditTable/components/ActionButton/index.js +51 -11
- package/es/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/index.js +28 -19
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderToolbar/index.js +17 -15
- package/es/ProEditTable/components/Summary/index.d.ts +1 -1
- package/es/ProEditTable/index.js +1 -1
- package/es/ProEditTable/propsType.d.ts +5 -3
- package/es/ProEditTable/utils/config.d.ts +1 -1
- package/es/ProEditTable/utils/config.js +8 -9
- package/es/ProEditTable/utils/diffOriginal.d.ts +1 -1
- package/es/ProEditTable/utils/diffOriginal.js +21 -22
- package/es/ProEditTable/utils/index.js +37 -33
- package/es/ProEditTable/utils/tools.js +4 -4
- package/es/ProEnum/components/Group.d.ts +1 -1
- package/es/ProEnum/components/Tag.d.ts +1 -1
- package/es/ProEnum/hooks/useEnumRequest.js +2 -2
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/index.js +1 -1
- package/es/ProEnum/utils/eventCenter.js +2 -1
- package/es/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/es/ProForm/components/base/Input/index.d.ts +1 -1
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
- package/es/ProForm/components/combination/FormList/utils.js +1 -1
- package/es/ProForm/components/combination/Group/component/ComRender.js +1 -1
- package/es/ProForm/components/combination/Group/index.js +7 -2
- package/es/ProForm/components/combination/Group/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/Group/utils.d.ts +6 -1
- package/es/ProForm/components/combination/Group/utils.js +28 -6
- package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/index.js +8 -8
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +5 -5
- package/es/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +2 -1
- package/es/ProForm/components/old/ProAddress/index.js +1 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
- package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/es/ProForm/components/render/Render.js +25 -13
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +8 -4
- package/es/ProForm/components/render/propsType.d.ts +3 -1
- package/es/ProForm/index.js +6 -3
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/utils/diffOriginal.js +9 -2
- package/es/ProForm/utils/index.js +10 -14
- package/es/ProForm/utils/useForm.js +1 -1
- package/es/ProForm/utils/useShouldUpdate.js +25 -5
- package/es/ProForm/utils/valueType.d.ts +8 -0
- package/es/ProForm/utils/valueType.js +98 -33
- package/es/ProIcon/utils/index.js +3 -4
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/es/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/style/index.less +0 -8
- package/es/ProLayout/index.d.ts +4 -4
- package/es/ProLayout/utils/index.js +9 -9
- package/es/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/es/ProSelect/index.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.d.ts +1 -1
- package/es/ProStep/components/Item/index.d.ts +1 -1
- package/es/ProStep/components/Listener/index.js +1 -1
- package/es/ProStep/components/Step/index.d.ts +1 -1
- package/es/ProStep/index.d.ts +2 -2
- package/es/ProStep/index.js +13 -12
- package/es/ProTable/components/FormatColumn/index.js +34 -5
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -9
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/es/ProTable/components/RenderColumn/index.js +10 -2
- package/es/ProTable/components/RenderFooter/index.d.ts +1 -1
- package/es/ProTable/components/RenderTableHeader/index.d.ts +1 -1
- package/es/ProTable/components/TableResizable/index.d.ts +1 -1
- package/es/ProTable/hooks/useAntdTable.js +7 -6
- package/es/ProTable/index.d.ts +1 -1
- package/es/ProTable/index.js +8 -5
- package/es/ProTable/propsType.d.ts +2 -0
- package/es/ProTable/style/index.less +7 -0
- package/es/ProTable/utils/index.d.ts +4 -0
- package/es/ProTable/utils/index.js +15 -0
- package/es/ProTabs/components/Card/index.d.ts +1 -1
- package/es/ProThemeTools/component/ProTools/index.d.ts +1 -1
- package/es/ProThemeTools/index.d.ts +1 -1
- package/es/ProTooltip/index.d.ts +1 -1
- package/es/ProTree/components/AdaptiveTooltip.d.ts +1 -1
- package/es/ProTree/components/CloseIcon.d.ts +2 -1
- package/es/ProTree/components/List.d.ts +1 -1
- package/es/ProTree/components/ProTree.d.ts +1 -1
- package/es/ProTree/components/ProTree.js +1 -1
- package/es/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/es/ProTree/components/ProTreeSelect/index.js +22 -22
- package/es/ProTree/components/SearchTitle.d.ts +1 -1
- package/es/ProTree/components/Tree.d.ts +1 -1
- package/es/ProTree/components/Tree.js +4 -4
- package/es/ProTree/index.d.ts +1 -1
- package/es/ProTree/utils.js +11 -12
- package/es/ProTreeModal/components/Cascader.d.ts +1 -1
- package/es/ProTreeModal/components/CloseIcon.d.ts +2 -1
- package/es/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/es/ProTreeModal/components/Tree.js +6 -6
- package/es/ProTreeModal/components/Trigger.d.ts +1 -1
- package/es/ProTreeModal/index.d.ts +1 -1
- package/es/ProTreeModal/index.js +3 -3
- package/es/ProTreeModal/utils.js +14 -16
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/es/ProUpload/components/ImageRender.js +1 -1
- package/es/ProViewer/index.js +2 -2
- package/es/old/ProEditableTable/index.js +4 -4
- package/lib/ProAction/index.js +5 -5
- package/lib/ProDownload/index.d.ts +1 -1
- package/lib/ProDownload/index.js +3 -3
- package/lib/ProDownload/utils.js +3 -3
- package/lib/ProDrawerForm/components/ProDrawer/index.js +4 -4
- package/lib/ProDrawerForm/components/ProModal/index.js +3 -3
- package/lib/ProEditLabel/index.js +3 -3
- package/lib/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/lib/ProEditTable/components/ActionButton/index.js +51 -11
- package/lib/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/index.js +27 -18
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
- package/lib/ProEditTable/components/RenderToolbar/index.js +17 -15
- package/lib/ProEditTable/components/Summary/index.d.ts +1 -1
- package/lib/ProEditTable/index.js +1 -1
- package/lib/ProEditTable/propsType.d.ts +5 -3
- package/lib/ProEditTable/utils/config.d.ts +1 -1
- package/lib/ProEditTable/utils/config.js +8 -9
- package/lib/ProEditTable/utils/diffOriginal.d.ts +1 -1
- package/lib/ProEditTable/utils/diffOriginal.js +21 -22
- package/lib/ProEditTable/utils/index.js +37 -33
- package/lib/ProEditTable/utils/tools.js +4 -4
- package/lib/ProEnum/components/Group.d.ts +1 -1
- package/lib/ProEnum/components/Tag.d.ts +1 -1
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/index.js +1 -1
- package/lib/ProEnum/utils/eventCenter.js +2 -1
- package/lib/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/lib/ProForm/components/base/Input/index.d.ts +1 -1
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
- package/lib/ProForm/components/combination/FormList/utils.js +1 -1
- package/lib/ProForm/components/combination/Group/component/ComRender.js +1 -1
- package/lib/ProForm/components/combination/Group/index.js +7 -2
- package/lib/ProForm/components/combination/Group/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/utils.d.ts +6 -1
- package/lib/ProForm/components/combination/Group/utils.js +28 -6
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.js +8 -8
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +5 -5
- package/lib/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +2 -1
- package/lib/ProForm/components/old/ProAddress/index.js +1 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +2 -1
- package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/lib/ProForm/components/render/Render.js +25 -13
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +8 -4
- package/lib/ProForm/components/render/propsType.d.ts +3 -1
- package/lib/ProForm/index.js +6 -3
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/utils/diffOriginal.js +9 -2
- package/lib/ProForm/utils/index.js +10 -10
- package/lib/ProForm/utils/useForm.js +1 -1
- package/lib/ProForm/utils/useShouldUpdate.js +25 -5
- package/lib/ProForm/utils/valueType.d.ts +8 -0
- package/lib/ProForm/utils/valueType.js +99 -34
- package/lib/ProIcon/utils/index.js +3 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/lib/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/lib/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/style/index.less +0 -8
- package/lib/ProLayout/index.d.ts +4 -4
- package/lib/ProLayout/utils/index.js +9 -9
- package/lib/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/lib/ProSelect/index.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.d.ts +1 -1
- package/lib/ProStep/components/Item/index.d.ts +1 -1
- package/lib/ProStep/components/Listener/index.js +1 -1
- package/lib/ProStep/components/Step/index.d.ts +1 -1
- package/lib/ProStep/index.d.ts +2 -2
- package/lib/ProStep/index.js +12 -11
- package/lib/ProTable/components/FormatColumn/index.js +34 -5
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -8
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/lib/ProTable/components/RenderColumn/index.js +10 -2
- package/lib/ProTable/components/RenderFooter/index.d.ts +1 -1
- package/lib/ProTable/components/RenderTableHeader/index.d.ts +1 -1
- package/lib/ProTable/components/TableResizable/index.d.ts +1 -1
- package/lib/ProTable/hooks/useAntdTable.js +6 -5
- package/lib/ProTable/index.d.ts +1 -1
- package/lib/ProTable/index.js +8 -5
- package/lib/ProTable/propsType.d.ts +2 -0
- package/lib/ProTable/style/index.less +7 -0
- package/lib/ProTable/utils/index.d.ts +4 -0
- package/lib/ProTable/utils/index.js +17 -1
- package/lib/ProTabs/components/Card/index.d.ts +1 -1
- package/lib/ProThemeTools/component/ProTools/index.d.ts +1 -1
- package/lib/ProThemeTools/index.d.ts +1 -1
- package/lib/ProTooltip/index.d.ts +1 -1
- package/lib/ProTree/components/AdaptiveTooltip.d.ts +1 -1
- package/lib/ProTree/components/CloseIcon.d.ts +2 -1
- package/lib/ProTree/components/List.d.ts +1 -1
- package/lib/ProTree/components/ProTree.d.ts +1 -1
- package/lib/ProTree/components/ProTree.js +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.js +22 -22
- package/lib/ProTree/components/SearchTitle.d.ts +1 -1
- package/lib/ProTree/components/Tree.d.ts +1 -1
- package/lib/ProTree/components/Tree.js +4 -4
- package/lib/ProTree/index.d.ts +1 -1
- package/lib/ProTree/utils.js +11 -11
- package/lib/ProTreeModal/components/Cascader.d.ts +1 -1
- package/lib/ProTreeModal/components/CloseIcon.d.ts +2 -1
- package/lib/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/lib/ProTreeModal/components/Tree.js +6 -6
- package/lib/ProTreeModal/components/Trigger.d.ts +1 -1
- package/lib/ProTreeModal/index.d.ts +1 -1
- package/lib/ProTreeModal/index.js +3 -3
- package/lib/ProTreeModal/utils.js +13 -13
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/lib/ProUpload/components/ImageRender.js +1 -1
- package/lib/ProViewer/index.js +2 -2
- package/lib/old/ProEditableTable/index.js +4 -4
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -5
@@ -22,7 +22,7 @@ var getRowKey = exports.getRowKey = function getRowKey(rowKey, record) {
|
|
22
22
|
}
|
23
23
|
return key;
|
24
24
|
};
|
25
|
-
var
|
25
|
+
var addLevelAndParentId = exports.addLevelAndParentId = function addLevelAndParentId(tree, rowKey) {
|
26
26
|
var currentLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
27
27
|
var currentParentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
28
28
|
return tree.map(function (node) {
|
@@ -31,7 +31,7 @@ var _addLevelAndParentId = exports.addLevelAndParentId = function addLevelAndPar
|
|
31
31
|
newNode.parentId = currentParentId;
|
32
32
|
newNode.rowKey = getRowKey(rowKey, node);
|
33
33
|
if (node.children) {
|
34
|
-
newNode.children =
|
34
|
+
newNode.children = addLevelAndParentId(node.children, rowKey, currentLevel + 1, newNode.rowKey);
|
35
35
|
}
|
36
36
|
return newNode;
|
37
37
|
});
|
@@ -46,7 +46,7 @@ function getFinalChildrenKey(tree, meta, options) {
|
|
46
46
|
return options.childrenKey;
|
47
47
|
}
|
48
48
|
// 前置深度优先遍历
|
49
|
-
var
|
49
|
+
var treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
50
50
|
var callbackResult = callback(treeItem, options);
|
51
51
|
if (callbackResult) {
|
52
52
|
return treeItem;
|
@@ -58,7 +58,7 @@ var _treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
|
58
58
|
}
|
59
59
|
for (var i = 0, count = children.length; i < count; i++) {
|
60
60
|
var childItem = children[i];
|
61
|
-
var findOne =
|
61
|
+
var findOne = treeNodePreImpl(childItem, callback, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, options), {}, {
|
62
62
|
parents: [].concat((0, _toConsumableArray2.default)(options.parents), [treeItem]),
|
63
63
|
depth: options.depth + 1
|
64
64
|
}));
|
@@ -69,7 +69,7 @@ var _treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
|
69
69
|
return undefined;
|
70
70
|
};
|
71
71
|
var treeNodeStrategies = {
|
72
|
-
pre:
|
72
|
+
pre: treeNodePreImpl
|
73
73
|
};
|
74
74
|
function treeNodeFind(tree, callback, options) {
|
75
75
|
var _options$childrenKey, _options$strategy;
|
@@ -134,7 +134,7 @@ function createTreeFromArray(array, options) {
|
|
134
134
|
return result;
|
135
135
|
}
|
136
136
|
// 前置遍历
|
137
|
-
var
|
137
|
+
var treeForEachPreImpl = function treeForEachPreImpl(treeItem, callback, options) {
|
138
138
|
callback(treeItem, options);
|
139
139
|
var finalChildrenKey = getFinalChildrenKey(treeItem, options, options);
|
140
140
|
var children = treeItem === null || treeItem === void 0 ? void 0 : treeItem[finalChildrenKey];
|
@@ -144,12 +144,12 @@ var _treeForEachPreImpl = function treeForEachPreImpl(treeItem, callback, option
|
|
144
144
|
depth: options.depth + 1
|
145
145
|
});
|
146
146
|
children.forEach(function (childItem) {
|
147
|
-
|
147
|
+
treeForEachPreImpl(childItem, callback, nextLevelOptions);
|
148
148
|
});
|
149
149
|
}
|
150
150
|
};
|
151
151
|
var treeForEachStrategies = {
|
152
|
-
pre:
|
152
|
+
pre: treeForEachPreImpl
|
153
153
|
};
|
154
154
|
function treeForEach(tree, callback, options) {
|
155
155
|
var _options$childrenKey2, _options$strategy2;
|
@@ -31,7 +31,8 @@ var RenderColumn = function RenderColumn(props) {
|
|
31
31
|
_props$toolTipProps = props.toolTipProps,
|
32
32
|
toolTipProps = _props$toolTipProps === void 0 ? {} : _props$toolTipProps,
|
33
33
|
minWidth = props.minWidth,
|
34
|
-
isInNewRowFlag = props.isInNewRowFlag
|
34
|
+
isInNewRowFlag = props.isInNewRowFlag,
|
35
|
+
scroll = props.scroll;
|
35
36
|
var _useSetState = (0, _ahooks.useSetState)({
|
36
37
|
tooltip: false
|
37
38
|
}),
|
@@ -45,8 +46,9 @@ var RenderColumn = function RenderColumn(props) {
|
|
45
46
|
// 比对场景走的逻辑
|
46
47
|
if (!isInNewRowFlag && (0, _lodash.isBoolean)(props === null || props === void 0 ? void 0 : props.isChanged)) {
|
47
48
|
var renderNode = value ? node : '-';
|
49
|
+
var isXMaxContent = (scroll === null || scroll === void 0 ? void 0 : scroll.x) === 'max-content';
|
48
50
|
if (ellipsis || (props === null || props === void 0 ? void 0 : props.isChanged)) {
|
49
|
-
renderNode = (0, _jsxRuntime.jsx)(Text, {
|
51
|
+
renderNode = !isXMaxContent ? (0, _jsxRuntime.jsx)(Text, {
|
50
52
|
style: {
|
51
53
|
width: currentValue === '-' ? 32.5 : width,
|
52
54
|
minWidth: minWidth
|
@@ -55,6 +57,12 @@ var RenderColumn = function RenderColumn(props) {
|
|
55
57
|
tooltip: false
|
56
58
|
},
|
57
59
|
children: ellipsis ? currentValue : renderNode
|
60
|
+
}) : (0, _jsxRuntime.jsx)("div", {
|
61
|
+
style: {
|
62
|
+
minWidth: minWidth,
|
63
|
+
width: width
|
64
|
+
},
|
65
|
+
children: ellipsis ? currentValue : renderNode
|
58
66
|
});
|
59
67
|
if ((props === null || props === void 0 ? void 0 : props.isChanged) === false) {
|
60
68
|
return renderNode;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const RenderFooter: (props: any) =>
|
1
|
+
declare const RenderFooter: (props: any) => JSX.Element;
|
2
2
|
export default RenderFooter;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const RenderTableHeader: (props: any) =>
|
1
|
+
declare const RenderTableHeader: (props: any) => JSX.Element;
|
2
2
|
export default RenderTableHeader;
|
@@ -226,16 +226,17 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
226
226
|
pageNum: 1,
|
227
227
|
pageSize: page.pageSize
|
228
228
|
};
|
229
|
+
var _values = (0, _utils.removeEmptyKeys)(values);
|
229
230
|
onPageChange(newPage);
|
230
231
|
setState({
|
231
|
-
searchValues:
|
232
|
+
searchValues: _values,
|
232
233
|
allSelected: false,
|
233
234
|
selectedRecords: [],
|
234
235
|
selectedRowKeys: []
|
235
236
|
});
|
236
237
|
run(getTransformParams((0, _objectSpread2.default)((0, _objectSpread2.default)({
|
237
238
|
page: newPage
|
238
|
-
}, extraFilter),
|
239
|
+
}, extraFilter), _values)));
|
239
240
|
}, [extraFilter, page.pageSize, run, getTransformParams]);
|
240
241
|
var resetParams = (0, _react.useCallback)(function () {
|
241
242
|
var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initPage;
|
@@ -283,7 +284,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
283
284
|
}
|
284
285
|
};
|
285
286
|
var handleRefresh = /*#__PURE__*/function () {
|
286
|
-
var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
287
|
+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
287
288
|
var res;
|
288
289
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
289
290
|
while (1) switch (_context.prev = _context.next) {
|
@@ -395,7 +396,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
395
396
|
total: total
|
396
397
|
}),
|
397
398
|
onSelect: function () {
|
398
|
-
var _onSelect = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(changeableRowKeys) {
|
399
|
+
var _onSelect = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(changeableRowKeys) {
|
399
400
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
400
401
|
while (1) switch (_context2.prev = _context2.next) {
|
401
402
|
case 0:
|
@@ -419,7 +420,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
419
420
|
key: 'uncheckAll',
|
420
421
|
text: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTable4 = _locale.default.ProTable) === null || _locale$ProTable4 === void 0 ? void 0 : _locale$ProTable4.deselect,
|
421
422
|
onSelect: function () {
|
422
|
-
var _onSelect2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3() {
|
423
|
+
var _onSelect2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3() {
|
423
424
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
|
424
425
|
while (1) switch (_context3.prev = _context3.next) {
|
425
426
|
case 0:
|
package/lib/ProTable/index.d.ts
CHANGED
package/lib/ProTable/index.js
CHANGED
@@ -194,7 +194,7 @@ var ProTable = function ProTable(props) {
|
|
194
194
|
return 'new-cell';
|
195
195
|
}
|
196
196
|
};
|
197
|
-
var
|
197
|
+
var formatColumns = function formatColumns(nextColumns) {
|
198
198
|
nextColumns === null || nextColumns === void 0 ? void 0 : nextColumns.forEach(function (item, index) {
|
199
199
|
(0, _FormatColumn.formatColumn)({
|
200
200
|
column: item,
|
@@ -209,7 +209,7 @@ var ProTable = function ProTable(props) {
|
|
209
209
|
isInNewRow: _rowClassName
|
210
210
|
});
|
211
211
|
if (item.children && Array.isArray(item.children)) {
|
212
|
-
|
212
|
+
formatColumns(item.children);
|
213
213
|
}
|
214
214
|
});
|
215
215
|
return nextColumns;
|
@@ -235,7 +235,7 @@ var ProTable = function ProTable(props) {
|
|
235
235
|
}).filter(function (item) {
|
236
236
|
return !(item === null || item === void 0 ? void 0 : item.delete);
|
237
237
|
});
|
238
|
-
var nextColumns =
|
238
|
+
var nextColumns = formatColumns(newColumns);
|
239
239
|
return nextColumns;
|
240
240
|
}, [curColumns, handleResize, _scroll, originalDataSource, originalObj, _rowClassName]);
|
241
241
|
var _columns = (0, _react.useMemo)(function () {
|
@@ -257,8 +257,11 @@ var ProTable = function ProTable(props) {
|
|
257
257
|
if (isExistPercentWidth) {
|
258
258
|
_scroll = props === null || props === void 0 ? void 0 : props.scroll;
|
259
259
|
}
|
260
|
+
if (props.expandable) {
|
261
|
+
_scroll = {};
|
262
|
+
}
|
260
263
|
var handleColumnConfig = /*#__PURE__*/function () {
|
261
|
-
var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(checkList) {
|
264
|
+
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(checkList) {
|
262
265
|
var newColumns, _columnConfig$onColum, catchColumns;
|
263
266
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
264
267
|
while (1) switch (_context.prev = _context.next) {
|
@@ -367,7 +370,7 @@ var ProTable = function ProTable(props) {
|
|
367
370
|
return _rowSelection;
|
368
371
|
};
|
369
372
|
var onDataSourceChange = /*#__PURE__*/function () {
|
370
|
-
var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(nextDataSource) {
|
373
|
+
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(nextDataSource) {
|
371
374
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
372
375
|
while (1) switch (_context2.prev = _context2.next) {
|
373
376
|
case 0:
|
@@ -46,6 +46,8 @@ export interface ProTableColumn extends Omit<ColumnType<any>, 'dataIndex'> {
|
|
46
46
|
viewRender?: ({ value, record, index, originalValue, originalRecord, }: any) => 'same' | 'changed' | 'add' | undefined;
|
47
47
|
isChanged?: boolean | null;
|
48
48
|
children?: ProTableColumn[];
|
49
|
+
/** table透传下来的scroll配置 */
|
50
|
+
scroll?: any;
|
49
51
|
}
|
50
52
|
export interface CreateTreeFromArrayOptions {
|
51
53
|
itemKey?: string;
|
@@ -40,6 +40,13 @@
|
|
40
40
|
.pro-form-view-container_nowrap {
|
41
41
|
white-space: normal;
|
42
42
|
}
|
43
|
+
&.@{ant-prefix}-table-row-expand-icon-cell {
|
44
|
+
>button.@{ant-prefix}-table-row-expand-icon{
|
45
|
+
left: 50%;
|
46
|
+
top: 50%;
|
47
|
+
transform: translate(-50%, -50%);
|
48
|
+
}
|
49
|
+
}
|
43
50
|
}
|
44
51
|
|
45
52
|
.@{ant-prefix}-table-thead
|
@@ -29,3 +29,7 @@ export declare const isListResult: (data: {
|
|
29
29
|
[key: string]: any;
|
30
30
|
}) => boolean;
|
31
31
|
export declare const getRowKey: (rowKey: any, record: any) => any;
|
32
|
+
/** 移除对象中的 null , undefined, '' 的key */
|
33
|
+
export declare const removeEmptyKeys: (obj: any) => {
|
34
|
+
[k: string]: unknown;
|
35
|
+
};
|
@@ -1,9 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
4
5
|
value: true
|
5
6
|
});
|
6
|
-
exports.isListResult = exports.getRowKey = exports.getOriginalValue = exports.getDecimalDigits = exports.getColumnDataIndex = void 0;
|
7
|
+
exports.removeEmptyKeys = exports.isListResult = exports.getRowKey = exports.getOriginalValue = exports.getDecimalDigits = exports.getColumnDataIndex = void 0;
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
7
9
|
var _lodash = require("lodash");
|
8
10
|
var _utils = require("@zat-design/utils");
|
9
11
|
var isEmpty = _utils.validate.isEmpty;
|
@@ -76,4 +78,18 @@ var getRowKey = exports.getRowKey = function getRowKey(rowKey, record) {
|
|
76
78
|
key = (_ref = typeof rowKey === 'function' ? rowKey(record) : record[rowKey]) !== null && _ref !== void 0 ? _ref : key;
|
77
79
|
}
|
78
80
|
return key;
|
81
|
+
};
|
82
|
+
/** 移除对象中的 null , undefined, '' 的key */
|
83
|
+
var removeEmptyKeys = exports.removeEmptyKeys = function removeEmptyKeys(obj) {
|
84
|
+
// 使用 Object.entries() 将对象转换为键值对数组
|
85
|
+
var entries = Object.entries(obj);
|
86
|
+
// 过滤掉值为 null, undefined, 或 '' 的键值对
|
87
|
+
var filteredEntries = entries.filter(function (_ref2) {
|
88
|
+
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
89
|
+
key = _ref3[0],
|
90
|
+
value = _ref3[1];
|
91
|
+
return !isEmpty(value);
|
92
|
+
});
|
93
|
+
// 使用 Object.fromEntries() 将过滤后的键值对数组转换回对象
|
94
|
+
return Object.fromEntries(filteredEntries);
|
79
95
|
};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { DevToolsPropsType } from '../../propsType';
|
2
|
-
declare const ProTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) =>
|
2
|
+
declare const ProTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) => JSX.Element;
|
3
3
|
export default ProTools;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ProThemeToolsProps } from './propsType';
|
2
2
|
declare const ProThemeTools: {
|
3
|
-
({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsProps):
|
3
|
+
({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsProps): JSX.Element;
|
4
4
|
defaultProps: {
|
5
5
|
size: number;
|
6
6
|
mode: string;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { ProTooltipPropsType } from './propsType';
|
2
2
|
import './style/index.less';
|
3
|
-
declare const ProTooltip: (props: ProTooltipPropsType) =>
|
3
|
+
declare const ProTooltip: (props: ProTooltipPropsType) => JSX.Element;
|
4
4
|
export default ProTooltip;
|
@@ -12,6 +12,6 @@ interface ListProps {
|
|
12
12
|
handleFilterClose?: (code: string) => void;
|
13
13
|
optionRender?: (item: any, searchStr?: string) => string | ReactNode;
|
14
14
|
}
|
15
|
-
declare function List(props: ListProps):
|
15
|
+
declare function List(props: ListProps): JSX.Element;
|
16
16
|
declare const _default: import("react").MemoExoticComponent<typeof List>;
|
17
17
|
export default _default;
|
@@ -359,7 +359,7 @@ var ProTree = function ProTree(props) {
|
|
359
359
|
};
|
360
360
|
/** 点击了树节点开始loading,改变自身state并将值通过onchange上传到form */
|
361
361
|
var onSelectTreeNode = /*#__PURE__*/function () {
|
362
|
-
var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(props, info) {
|
362
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(props, info) {
|
363
363
|
var _options$;
|
364
364
|
var values, options, option;
|
365
365
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { PropTreeSelectProps } from './propsType';
|
3
|
-
export declare const ProTreeSelect: (props: PropTreeSelectProps, ref: React.Ref<unknown> | undefined) =>
|
3
|
+
export declare const ProTreeSelect: (props: PropTreeSelectProps, ref: React.Ref<unknown> | undefined) => JSX.Element;
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<PropTreeSelectProps & React.RefAttributes<unknown>>;
|
5
5
|
export default _default;
|
@@ -110,14 +110,14 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
110
110
|
}
|
111
111
|
var count = 0;
|
112
112
|
var result = [];
|
113
|
-
var
|
113
|
+
var loopCount = function loopCount(data) {
|
114
114
|
data.map(function (item) {
|
115
115
|
count += 1;
|
116
116
|
var children = item.children,
|
117
117
|
other = (0, _objectWithoutProperties2.default)(item, _excluded2);
|
118
118
|
result.push((0, _objectSpread2.default)({}, other));
|
119
119
|
if (item.children) {
|
120
|
-
|
120
|
+
loopCount(item.children);
|
121
121
|
}
|
122
122
|
return item;
|
123
123
|
});
|
@@ -125,7 +125,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
125
125
|
if ((dictsEnum === null || dictsEnum === void 0 ? void 0 : dictsEnum.length) > 10) {
|
126
126
|
return dictsEnum;
|
127
127
|
}
|
128
|
-
|
128
|
+
loopCount(dictsEnum);
|
129
129
|
if (count <= 10) {
|
130
130
|
return result;
|
131
131
|
}
|
@@ -139,17 +139,17 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
139
139
|
*/
|
140
140
|
var transferDataSource = function transferDataSource(dataArr, showCodeAndName) {
|
141
141
|
var copyData = (0, _lodash.cloneDeep)(dataArr);
|
142
|
-
var
|
142
|
+
var loop = function loop(arr) {
|
143
143
|
arr.map(function (item) {
|
144
144
|
item[label] = "".concat(item[code], "-").concat(item[label]);
|
145
145
|
if (item.children) {
|
146
|
-
|
146
|
+
loop(item.children);
|
147
147
|
}
|
148
148
|
return item;
|
149
149
|
});
|
150
150
|
};
|
151
151
|
if (showCodeAndName) {
|
152
|
-
|
152
|
+
loop(copyData);
|
153
153
|
}
|
154
154
|
return copyData;
|
155
155
|
};
|
@@ -243,19 +243,19 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
243
243
|
return viewEmpty;
|
244
244
|
}
|
245
245
|
var labelResult = [];
|
246
|
-
var
|
246
|
+
var queryLabel = function queryLabel(dicts) {
|
247
247
|
return dicts.map(function (item) {
|
248
248
|
if (value.includes(item[code])) {
|
249
249
|
var labelText = item[label];
|
250
250
|
labelResult.push(labelText);
|
251
251
|
}
|
252
252
|
if (item.children) {
|
253
|
-
|
253
|
+
queryLabel(item.children);
|
254
254
|
}
|
255
255
|
return item;
|
256
256
|
});
|
257
257
|
};
|
258
|
-
|
258
|
+
queryLabel(origDataSource);
|
259
259
|
return labelResult === null || labelResult === void 0 ? void 0 : labelResult.join(',');
|
260
260
|
};
|
261
261
|
// 纯展示处理
|
@@ -293,7 +293,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
293
293
|
* @param node 每个节点数据对象
|
294
294
|
* @returns 整个react节点树
|
295
295
|
*/
|
296
|
-
var
|
296
|
+
var renderTreeNode = function renderTreeNode(node, grade) {
|
297
297
|
var children = node.children,
|
298
298
|
icon = node.icon;
|
299
299
|
var labelText = node[label];
|
@@ -364,7 +364,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
364
364
|
checkable: node.checkable,
|
365
365
|
className: "node-val-".concat(value),
|
366
366
|
children: children.map(function (child) {
|
367
|
-
return
|
367
|
+
return renderTreeNode(child, sonGrade);
|
368
368
|
})
|
369
369
|
}, key);
|
370
370
|
};
|
@@ -375,7 +375,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
375
375
|
* @returns 处理后得树
|
376
376
|
*/
|
377
377
|
function filterTree(sourceList, keyWord) {
|
378
|
-
var
|
378
|
+
var filterData = function filterData(data) {
|
379
379
|
var currentAllNodeChild = []; // 记录当前节点得所有子节点
|
380
380
|
// 遍历数组
|
381
381
|
for (var i = 0; i < data.length; i++) {
|
@@ -383,7 +383,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
383
383
|
// 一直递归到最后一层子节点
|
384
384
|
var currentNodeChild = []; // 记录当前节点下得子节点匹配到的节点个数
|
385
385
|
if (item.children && item.children.length > 0) {
|
386
|
-
currentNodeChild =
|
386
|
+
currentNodeChild = filterData(item.children);
|
387
387
|
}
|
388
388
|
// 迭代完子节点向上回溯,如果有匹配到得子节点,那么加入当前节点得孩子对象上,否则加入得是空数组
|
389
389
|
item.children = currentNodeChild;
|
@@ -397,11 +397,11 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
397
397
|
}
|
398
398
|
return currentAllNodeChild;
|
399
399
|
};
|
400
|
-
sourceList =
|
400
|
+
sourceList = filterData(sourceList);
|
401
401
|
return sourceList;
|
402
402
|
}
|
403
|
-
var searchTreeEvent = (0, _lodash.debounce)(/*#__PURE__*/function () {
|
404
|
-
var _ref5 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(searchVal) {
|
403
|
+
var searchTreeEvent = (0, _lodash.debounce)( /*#__PURE__*/function () {
|
404
|
+
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(searchVal) {
|
405
405
|
var result;
|
406
406
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
407
407
|
while (1) switch (_context.prev = _context.next) {
|
@@ -431,7 +431,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
431
431
|
}(), 500);
|
432
432
|
function findTreeNode(treeList, nodeValue) {
|
433
433
|
var result = {};
|
434
|
-
var
|
434
|
+
var filterData = function filterData(data) {
|
435
435
|
for (var i = 0; i < data.length; i++) {
|
436
436
|
var item = data[i];
|
437
437
|
if (item[code] === nodeValue || Array.isArray(nodeValue) && nodeValue.includes(item[code])) {
|
@@ -443,11 +443,11 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
443
443
|
}
|
444
444
|
// 一直递归到最后一层子节点
|
445
445
|
if (item.children && item.children.length > 0) {
|
446
|
-
|
446
|
+
filterData(item.children);
|
447
447
|
}
|
448
448
|
}
|
449
449
|
};
|
450
|
-
|
450
|
+
filterData(treeList);
|
451
451
|
return result;
|
452
452
|
}
|
453
453
|
function getLabelByValue(treeList, nodeValue) {
|
@@ -569,8 +569,8 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
569
569
|
children: (0, _jsxRuntime.jsx)(_antd.TreeSelect, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
570
570
|
maxTagPlaceholder: function maxTagPlaceholder(rest) {
|
571
571
|
var _rest = rest.map(function (tag) {
|
572
|
-
var _tag$label, _tag$label$props, _tag$
|
573
|
-
return (tag === null || tag === void 0 ? void 0 : (_tag$label = tag.label) === null || _tag$label === void 0 ? void 0 : (_tag$label$props = _tag$label.props) === null || _tag$label$props === void 0 ? void 0 : (_tag$label$props$
|
572
|
+
var _tag$label, _tag$label$props, _tag$label2, _tag$label2$props, _tag$label2$props$chi, _tag$label2$props$chi2, _tag$label2$props$chi3, _tag$label3, _tag$label3$props, _tag$label3$props$dan;
|
573
|
+
return ((tag === null || tag === void 0 ? void 0 : (_tag$label = tag.label) === null || _tag$label === void 0 ? void 0 : (_tag$label$props = _tag$label.props) === null || _tag$label$props === void 0 ? void 0 : _tag$label$props.children) ? tag === null || tag === void 0 ? void 0 : (_tag$label2 = tag.label) === null || _tag$label2 === void 0 ? void 0 : (_tag$label2$props = _tag$label2.props) === null || _tag$label2$props === void 0 ? void 0 : (_tag$label2$props$chi = _tag$label2$props.children) === null || _tag$label2$props$chi === void 0 ? void 0 : (_tag$label2$props$chi2 = _tag$label2$props$chi.props) === null || _tag$label2$props$chi2 === void 0 ? void 0 : (_tag$label2$props$chi3 = _tag$label2$props$chi2.dangerouslySetInnerHTML) === null || _tag$label2$props$chi3 === void 0 ? void 0 : _tag$label2$props$chi3.__html : tag === null || tag === void 0 ? void 0 : (_tag$label3 = tag.label) === null || _tag$label3 === void 0 ? void 0 : (_tag$label3$props = _tag$label3.props) === null || _tag$label3$props === void 0 ? void 0 : (_tag$label3$props$dan = _tag$label3$props.dangerouslySetInnerHTML) === null || _tag$label3$props$dan === void 0 ? void 0 : _tag$label3$props$dan.__html) || tag.label;
|
574
574
|
});
|
575
575
|
var _str = _rest.join('、');
|
576
576
|
return (0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
@@ -584,7 +584,7 @@ var ProTreeSelect = exports.ProTreeSelect = function ProTreeSelect(props, ref) {
|
|
584
584
|
}
|
585
585
|
}, treeProps), {}, {
|
586
586
|
children: selectList.map(function (node) {
|
587
|
-
return
|
587
|
+
return renderTreeNode(node, 1);
|
588
588
|
})
|
589
589
|
}))
|
590
590
|
});
|
@@ -6,6 +6,6 @@ declare function SearchTitle(props: {
|
|
6
6
|
showEllipse?: boolean;
|
7
7
|
ellipseWidth?: string;
|
8
8
|
otherProps?: ProFormOtherProps;
|
9
|
-
}):
|
9
|
+
}): JSX.Element;
|
10
10
|
declare const _default: import("react").MemoExoticComponent<typeof SearchTitle>;
|
11
11
|
export default _default;
|
@@ -23,5 +23,5 @@ interface ListProps extends ProTreeProps {
|
|
23
23
|
handleFilterClose?: (code: string, node?: any) => void;
|
24
24
|
[key: string]: any;
|
25
25
|
}
|
26
|
-
declare function List(props: ListProps):
|
26
|
+
declare function List(props: ListProps): JSX.Element;
|
27
27
|
export default List;
|
@@ -115,7 +115,7 @@ function List(props) {
|
|
115
115
|
}
|
116
116
|
}, [selectedKey]);
|
117
117
|
var onSelect = /*#__PURE__*/function () {
|
118
|
-
var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(value, item) {
|
118
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(value, item) {
|
119
119
|
var _props$onSelect;
|
120
120
|
var val;
|
121
121
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
@@ -303,7 +303,7 @@ function List(props) {
|
|
303
303
|
}, onlyKey);
|
304
304
|
};
|
305
305
|
function fn() {
|
306
|
-
var
|
306
|
+
var loop = function loop(data, index) {
|
307
307
|
index++;
|
308
308
|
var treeRow = data.map(function (item) {
|
309
309
|
var nodeClass = 'pro-tree-tree-node ';
|
@@ -325,7 +325,7 @@ function List(props) {
|
|
325
325
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
326
326
|
title: nodeTitle,
|
327
327
|
key: (item === null || item === void 0 ? void 0 : item.key) || item[fieldNameValue],
|
328
|
-
children:
|
328
|
+
children: loop(item[fieldNames.children], index)
|
329
329
|
});
|
330
330
|
}
|
331
331
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
@@ -342,7 +342,7 @@ function List(props) {
|
|
342
342
|
if (searchStr) {
|
343
343
|
newTreeData = (0, _utils.filterCheckedNodes)(originalTreeData, [], searchStr, fieldNames);
|
344
344
|
}
|
345
|
-
return
|
345
|
+
return loop(newTreeData, -1);
|
346
346
|
}
|
347
347
|
var _treeData = fn();
|
348
348
|
var onExpand = function onExpand(newExpandedKeys, nextPara) {
|
package/lib/ProTree/index.d.ts
CHANGED