@zat-design/sisyphus-react 3.7.3 → 3.8.0-beat.2
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/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
- package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
- package/coverage/lcov-report/src/.umi/core/index.html +206 -0
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
- package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
- package/coverage/lcov-report/src/.umi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +172 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +94 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +106 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
- package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
- package/dist/index.esm.css +100 -4
- package/dist/less.esm.css +97 -4
- package/es/ProAction/index.js +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.js +3 -3
- package/es/ProEditTable/components/RenderField/{ListChanged.d.ts → ListChangedWrapper.d.ts} +4 -3
- package/es/ProEditTable/components/RenderField/{ListChanged.js → ListChangedWrapper.js} +22 -10
- package/es/ProEditTable/components/RenderField/index.js +8 -8
- package/es/ProEditTable/components/RenderToolbar/index.js +1 -1
- package/es/ProEditTable/utils/config.js +2 -2
- package/es/ProEditTable/utils/index.js +5 -5
- package/es/ProEditTable/utils/tools.js +1 -1
- package/es/ProEnum/components/Group.js +10 -2
- package/es/ProEnum/hooks/useEnumRequest.js +2 -2
- package/es/ProEnum/index.js +6 -5
- package/es/ProEnum/style/index.less +14 -4
- package/es/ProEnum/utils/index.d.ts +1 -1
- package/es/ProEnum/utils/index.js +4 -0
- package/es/ProForm/components/combination/Container/index.js +5 -3
- package/es/ProForm/components/combination/Container/propsType.d.ts +2 -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 +6 -5
- package/es/ProForm/components/combination/Group/component/ComRender.js +1 -1
- package/es/ProForm/components/combination/Group/utils.js +8 -1
- package/es/ProForm/components/combination/ProCascader/index.js +1 -1
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +50 -45
- package/es/ProForm/components/combination/ProNumberRange/index.js +14 -5
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +5 -1
- package/es/ProForm/components/old/ProAddress/index.js +1 -1
- package/es/ProForm/components/render/ChangedWrapper.d.ts +17 -0
- package/es/ProForm/components/render/ChangedWrapper.js +108 -0
- package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/es/ProForm/components/render/Render.js +10 -11
- package/es/ProForm/components/render/RenderFields.d.ts +2 -3
- package/es/ProForm/components/render/RenderFields.js +3 -4
- package/es/ProForm/components/render/propsType.d.ts +5 -4
- package/es/ProForm/index.js +4 -7
- package/es/ProForm/propsType.d.ts +13 -2
- package/es/ProForm/style/index.less +103 -5
- package/es/ProForm/utils/diffOriginal.d.ts +4 -4
- package/es/ProForm/utils/diffOriginal.js +18 -7
- package/es/ProForm/utils/transformValue.js +17 -11
- package/es/ProForm/utils/useForm.js +1 -1
- package/es/ProForm/utils/useShouldUpdate.d.ts +2 -2
- package/es/ProForm/utils/useShouldUpdate.js +1 -1
- package/es/ProSelect/index.js +12 -11
- package/es/ProSelect/propsType.d.ts +4 -0
- package/es/ProSelect/utils/index.js +5 -4
- package/es/ProStep/components/Listener/index.d.ts +1 -1
- package/es/ProStep/components/Listener/index.js +6 -3
- package/es/ProStep/index.d.ts +1 -1
- package/es/ProStep/index.js +25 -18
- package/es/ProTable/components/FormatColumn/index.d.ts +7 -1
- package/es/ProTable/components/FormatColumn/index.js +14 -8
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
- package/es/ProTable/hooks/useAntdTable.js +3 -3
- package/es/ProTable/index.js +30 -13
- package/es/ProTable/propsType.d.ts +14 -1
- package/es/ProTable/style/index.less +1 -1
- package/es/ProTree/components/AdaptiveTooltip.d.ts +4 -0
- package/es/ProTree/components/AdaptiveTooltip.js +55 -0
- package/es/ProTree/components/List.js +15 -3
- package/es/ProTree/components/ProTree.js +1 -1
- package/es/ProTree/components/ProTreeSelect/index.js +28 -8
- package/es/ProTree/components/ProTreeSelect/propsType.d.ts +2 -0
- package/es/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/es/ProTree/components/SearchTitle.d.ts +2 -0
- package/es/ProTree/components/SearchTitle.js +17 -8
- package/es/ProTree/components/Tree.js +1 -1
- package/es/ProTree/style/index.less +14 -0
- package/es/ProTreeModal/components/Tree.js +15 -17
- package/es/ProTreeModal/index.js +62 -7
- package/es/ProTreeModal/utils.d.ts +1 -0
- package/es/ProTreeModal/utils.js +21 -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/es/style/theme/antd.less +5 -0
- package/es/style/theme/index.less +2 -1
- package/es/style/theme/tokens.less +1 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +13 -0
- package/lib/ProAction/index.js +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.js +3 -3
- package/lib/ProEditTable/components/RenderField/{ListChanged.d.ts → ListChangedWrapper.d.ts} +4 -3
- package/lib/ProEditTable/components/RenderField/{ListChanged.js → ListChangedWrapper.js} +25 -11
- package/lib/ProEditTable/components/RenderField/index.js +8 -8
- package/lib/ProEditTable/components/RenderToolbar/index.js +1 -1
- package/lib/ProEditTable/utils/config.js +2 -2
- package/lib/ProEditTable/utils/index.js +5 -5
- package/lib/ProEditTable/utils/tools.js +1 -1
- package/lib/ProEnum/components/Group.js +10 -2
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.js +6 -5
- package/lib/ProEnum/style/index.less +14 -4
- package/lib/ProEnum/utils/index.d.ts +1 -1
- package/lib/ProEnum/utils/index.js +4 -0
- package/lib/ProForm/components/combination/Container/index.js +5 -3
- package/lib/ProForm/components/combination/Container/propsType.d.ts +2 -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 +5 -4
- package/lib/ProForm/components/combination/Group/component/ComRender.js +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +8 -1
- package/lib/ProForm/components/combination/ProCascader/index.js +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +49 -44
- package/lib/ProForm/components/combination/ProNumberRange/index.js +14 -5
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +5 -1
- package/lib/ProForm/components/old/ProAddress/index.js +1 -1
- package/lib/ProForm/components/render/ChangedWrapper.d.ts +17 -0
- package/lib/ProForm/components/render/ChangedWrapper.js +113 -0
- package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/lib/ProForm/components/render/Render.js +10 -11
- package/lib/ProForm/components/render/RenderFields.d.ts +2 -3
- package/lib/ProForm/components/render/RenderFields.js +3 -4
- package/lib/ProForm/components/render/propsType.d.ts +5 -4
- package/lib/ProForm/index.js +4 -7
- package/lib/ProForm/propsType.d.ts +13 -2
- package/lib/ProForm/style/index.less +103 -5
- package/lib/ProForm/utils/diffOriginal.d.ts +4 -4
- package/lib/ProForm/utils/diffOriginal.js +18 -7
- package/lib/ProForm/utils/transformValue.js +17 -11
- package/lib/ProForm/utils/useForm.js +1 -1
- package/lib/ProForm/utils/useShouldUpdate.d.ts +2 -2
- package/lib/ProForm/utils/useShouldUpdate.js +1 -1
- package/lib/ProSelect/index.js +12 -11
- package/lib/ProSelect/propsType.d.ts +4 -0
- package/lib/ProSelect/utils/index.js +5 -4
- package/lib/ProStep/components/Listener/index.d.ts +1 -1
- package/lib/ProStep/components/Listener/index.js +6 -3
- package/lib/ProStep/index.d.ts +1 -1
- package/lib/ProStep/index.js +25 -18
- package/lib/ProTable/components/FormatColumn/index.d.ts +7 -1
- package/lib/ProTable/components/FormatColumn/index.js +14 -8
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
- package/lib/ProTable/hooks/useAntdTable.js +3 -3
- package/lib/ProTable/index.js +30 -13
- package/lib/ProTable/propsType.d.ts +14 -1
- package/lib/ProTable/style/index.less +1 -1
- package/lib/ProTree/components/AdaptiveTooltip.d.ts +4 -0
- package/lib/ProTree/components/AdaptiveTooltip.js +61 -0
- package/lib/ProTree/components/List.js +15 -3
- package/lib/ProTree/components/ProTree.js +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.js +28 -8
- package/lib/ProTree/components/ProTreeSelect/propsType.d.ts +2 -0
- package/lib/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/lib/ProTree/components/SearchTitle.d.ts +2 -0
- package/lib/ProTree/components/SearchTitle.js +19 -7
- package/lib/ProTree/components/Tree.js +1 -1
- package/lib/ProTree/style/index.less +14 -0
- package/lib/ProTreeModal/components/Tree.js +15 -17
- package/lib/ProTreeModal/index.js +61 -6
- package/lib/ProTreeModal/utils.d.ts +1 -0
- package/lib/ProTreeModal/utils.js +20 -0
- package/lib/ProUpload/components/ImageRender.js +1 -1
- package/lib/ProViewer/index.js +2 -2
- package/lib/old/ProEditableTable/index.js +4 -4
- package/lib/style/theme/antd.less +5 -0
- package/lib/style/theme/index.less +2 -1
- package/lib/style/theme/tokens.less +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +19 -0
- package/package.json +3 -1
- package/patches/rc-table+7.26.0.patch +49 -0
- package/es/ProForm/components/render/Changed.d.ts +0 -14
- package/es/ProForm/components/render/Changed.js +0 -64
- package/lib/ProForm/components/render/Changed.d.ts +0 -14
- package/lib/ProForm/components/render/Changed.js +0 -69
- /package/es/ProForm/utils/{useChanged.d.ts → _useChanged.d.ts} +0 -0
- /package/es/ProForm/utils/{useChanged.js → _useChanged.js} +0 -0
- /package/es/ProForm/utils/{useListChanged.d.ts → _useListChanged.d.ts} +0 -0
- /package/es/ProForm/utils/{useListChanged.js → _useListChanged.js} +0 -0
- /package/lib/ProForm/utils/{useChanged.d.ts → _useChanged.d.ts} +0 -0
- /package/lib/ProForm/utils/{useChanged.js → _useChanged.js} +0 -0
- /package/lib/ProForm/utils/{useListChanged.d.ts → _useListChanged.d.ts} +0 -0
- /package/lib/ProForm/utils/{useListChanged.js → _useListChanged.js} +0 -0
|
@@ -20,6 +20,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
20
20
|
var _index = require("../index");
|
|
21
21
|
var _components = require("./components");
|
|
22
22
|
var _utils = require("./utils");
|
|
23
|
+
var _index2 = require("../ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index");
|
|
23
24
|
var _inputSearch = _interopRequireDefault(require("../assets/input-search.svg"));
|
|
24
25
|
var _locale = _interopRequireWildcard(require("../locale"));
|
|
25
26
|
require("./style/index.less");
|
|
@@ -27,7 +28,7 @@ require("./style/index.less");
|
|
|
27
28
|
* @Author: za-xuwenli xuwenli@zhongan.io
|
|
28
29
|
* @Date: 2024-06-04 10:01:18
|
|
29
30
|
* @LastEditors: za-xuwenli xuwenli@zhongan.io
|
|
30
|
-
* @LastEditTime: 2024-
|
|
31
|
+
* @LastEditTime: 2024-09-27 11:49:28
|
|
31
32
|
* @FilePath: /za-material-warehouse/src/ProTreeModal/index.tsx
|
|
32
33
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
33
34
|
*/
|
|
@@ -100,7 +101,8 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
100
101
|
flatTreeData: [],
|
|
101
102
|
searchStr: '',
|
|
102
103
|
checkAll: false,
|
|
103
|
-
allKeys: []
|
|
104
|
+
allKeys: [],
|
|
105
|
+
transformedTree: []
|
|
104
106
|
}),
|
|
105
107
|
_useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
|
|
106
108
|
state = _useSetState2[0],
|
|
@@ -222,6 +224,12 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
222
224
|
});
|
|
223
225
|
}
|
|
224
226
|
}, [value, state.allKeys, state.open]);
|
|
227
|
+
(0, _ahooks.useDeepCompareEffect)(function () {
|
|
228
|
+
var transformedTree = (0, _utils.addLevelAndParentId)(state.treeData, fieldNames);
|
|
229
|
+
setState({
|
|
230
|
+
transformedTree: transformedTree
|
|
231
|
+
});
|
|
232
|
+
}, [state.treeData]);
|
|
225
233
|
var handleClick = function handleClick() {
|
|
226
234
|
setState({
|
|
227
235
|
open: true
|
|
@@ -362,8 +370,55 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
362
370
|
var onCheck = function onCheck(checkedKeys, info) {
|
|
363
371
|
var checkedValues = (0, _toConsumableArray2.default)(state.checkedValues);
|
|
364
372
|
var originalTreeData = state.originalTreeData;
|
|
373
|
+
// 如果有检索则自管理
|
|
374
|
+
if (state.searchStr) {
|
|
375
|
+
var _transformTreeToArray;
|
|
376
|
+
var node = info.node;
|
|
377
|
+
// 从完整树中找到当前节点
|
|
378
|
+
var activeNode = (0, _index2.treeNodeFind)(state.transformedTree, function (t) {
|
|
379
|
+
return t[fieldNameValue] === node[fieldNameValue];
|
|
380
|
+
}, {
|
|
381
|
+
childrenKey: fieldNames.children
|
|
382
|
+
});
|
|
383
|
+
var allChildren = (_transformTreeToArray = (0, _index2.transformTreeToArray)([activeNode], {
|
|
384
|
+
childrenKey: fieldNames.children
|
|
385
|
+
})) === null || _transformTreeToArray === void 0 ? void 0 : _transformTreeToArray.map(function (item) {
|
|
386
|
+
return item[fieldNameValue];
|
|
387
|
+
});
|
|
388
|
+
// 子项合并勾选
|
|
389
|
+
checkedValues = checkedValues.concat(allChildren);
|
|
390
|
+
// 从完整树中拿到父节点 只要存在父节点,那么就判断当前children是否全被勾选 若全被勾选就合并当前key到勾选队列
|
|
391
|
+
var _recourse2 = function _recourse(findNode) {
|
|
392
|
+
if (findNode.parentId) {
|
|
393
|
+
var _transformTreeToArray2;
|
|
394
|
+
var parentNode = (0, _index2.treeNodeFind)(state.transformedTree, function (t) {
|
|
395
|
+
return t[fieldNameValue] === findNode.parentId;
|
|
396
|
+
}, {
|
|
397
|
+
childrenKey: fieldNames.children
|
|
398
|
+
});
|
|
399
|
+
var parentChildrenKeys = (_transformTreeToArray2 = (0, _index2.transformTreeToArray)([parentNode], {
|
|
400
|
+
childrenKey: fieldNames.children
|
|
401
|
+
})) === null || _transformTreeToArray2 === void 0 ? void 0 : _transformTreeToArray2.map(function (item) {
|
|
402
|
+
return item[fieldNameValue];
|
|
403
|
+
});
|
|
404
|
+
var parentChildrenAllChecked = parentChildrenKeys.every(function (key) {
|
|
405
|
+
return checkedValues.includes(key);
|
|
406
|
+
});
|
|
407
|
+
if (parentChildrenAllChecked) {
|
|
408
|
+
// 把当前父节点追加进来
|
|
409
|
+
checkedValues = checkedValues.concat([parentNode[fieldNameValue]]);
|
|
410
|
+
// 继续向上查找
|
|
411
|
+
if (parentNode.parentId) {
|
|
412
|
+
_recourse2(parentNode);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
_recourse2(activeNode);
|
|
418
|
+
}
|
|
419
|
+
var _checkStrictly = state.searchStr ? true : checkStrictly;
|
|
365
420
|
// 此时应该取消掉自身并包含它所有的子集
|
|
366
|
-
if (!info.checked && !
|
|
421
|
+
if (!info.checked && !_checkStrictly) {
|
|
367
422
|
// 1. 取消自身
|
|
368
423
|
// 2. 把所有的子节点也要取消
|
|
369
424
|
var childrenkeys = [];
|
|
@@ -380,8 +435,8 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
380
435
|
return !parentKeys.includes(key);
|
|
381
436
|
});
|
|
382
437
|
} else {
|
|
383
|
-
//
|
|
384
|
-
if (
|
|
438
|
+
// _checkStrictly 模式下取 checkedKeys.checked 或者自身的 key
|
|
439
|
+
if (_checkStrictly) {
|
|
385
440
|
if (!info.checked) {
|
|
386
441
|
checkedValues = checkedValues.filter(function (key) {
|
|
387
442
|
return key !== info.node.key;
|
|
@@ -620,7 +675,7 @@ var ProTreeModal = function ProTreeModal(props) {
|
|
|
620
675
|
});
|
|
621
676
|
case TREE:
|
|
622
677
|
return (0, _jsxRuntime.jsx)(_components.TreeView, {
|
|
623
|
-
treeData: state.
|
|
678
|
+
treeData: state.transformedTree,
|
|
624
679
|
originalTreeData: state.originalTreeData,
|
|
625
680
|
flatTreeData: state.flatTreeData,
|
|
626
681
|
checkedValues: state.checkedValues,
|
|
@@ -36,3 +36,4 @@ export declare function filterCheckedNodes(data: any, checkedKeys: any, searchSt
|
|
|
36
36
|
*/
|
|
37
37
|
export declare function getChildrenKeys(node: TreeDataProps, childrenKeys: string[], fieldNames: FieldNamesType, type: 'treeClose' | 'treeCheck'): void;
|
|
38
38
|
export declare const transformMessage: (obj: any, message: string) => string;
|
|
39
|
+
export declare const addLevelAndParentId: (tree: any[], fieldNames: any, currentLevel?: number, currentParentId?: any) => any[];
|
|
@@ -4,6 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
exports.addLevelAndParentId = void 0;
|
|
7
8
|
exports.filterCheckedNodes = filterCheckedNodes;
|
|
8
9
|
exports.findTreeNodeByKey = findTreeNodeByKey;
|
|
9
10
|
exports.getAllKeys = getAllKeys;
|
|
@@ -209,4 +210,23 @@ var transformMessage = exports.transformMessage = function transformMessage(obj,
|
|
|
209
210
|
_message = message.replaceAll("{".concat(key, "}"), obj[key]);
|
|
210
211
|
});
|
|
211
212
|
return _message;
|
|
213
|
+
};
|
|
214
|
+
var _addLevelAndParentId = exports.addLevelAndParentId = function addLevelAndParentId() {
|
|
215
|
+
var tree = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
216
|
+
var fieldNames = arguments.length > 1 ? arguments[1] : undefined;
|
|
217
|
+
var currentLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
218
|
+
var currentParentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
219
|
+
var _fieldNames$children = fieldNames.children,
|
|
220
|
+
children = _fieldNames$children === void 0 ? 'children' : _fieldNames$children,
|
|
221
|
+
_fieldNames$value = fieldNames.value,
|
|
222
|
+
value = _fieldNames$value === void 0 ? 'value' : _fieldNames$value;
|
|
223
|
+
return tree.map(function (node) {
|
|
224
|
+
var newNode = (0, _objectSpread4.default)({}, node);
|
|
225
|
+
newNode.level = currentLevel;
|
|
226
|
+
newNode.parentId = currentParentId;
|
|
227
|
+
if (node[children]) {
|
|
228
|
+
newNode[children] = _addLevelAndParentId(node[children], fieldNames, currentLevel + 1, newNode[value]);
|
|
229
|
+
}
|
|
230
|
+
return newNode;
|
|
231
|
+
});
|
|
212
232
|
};
|
|
@@ -166,7 +166,7 @@ var ImageRender = function ImageRender(props) {
|
|
|
166
166
|
disabled: isView || disabled,
|
|
167
167
|
className: "action-item",
|
|
168
168
|
onClick: function () {
|
|
169
|
-
var _onClick = (0, _asyncToGenerator2.default)(
|
|
169
|
+
var _onClick = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
170
170
|
var res;
|
|
171
171
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
172
172
|
while (1) switch (_context.prev = _context.next) {
|
package/lib/ProViewer/index.js
CHANGED
|
@@ -112,8 +112,8 @@ var ProViewer = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
|
112
112
|
(0, _react.useEffect)(function () {
|
|
113
113
|
if (previewFile) {
|
|
114
114
|
try {
|
|
115
|
-
previewFile().then(
|
|
116
|
-
var _ref3 = (0, _asyncToGenerator2.default)(
|
|
115
|
+
previewFile().then(/*#__PURE__*/function () {
|
|
116
|
+
var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(response) {
|
|
117
117
|
var res, blob, blobUrl;
|
|
118
118
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
119
119
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -166,7 +166,7 @@ var ProEditableTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
|
166
166
|
* @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
|
|
167
167
|
*/
|
|
168
168
|
var onMultipleDelete = /*#__PURE__*/function () {
|
|
169
|
-
var _ref2 = (0, _asyncToGenerator2.default)(
|
|
169
|
+
var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
170
170
|
var res, values, nextList, resetFieldsIndex;
|
|
171
171
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
172
172
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -272,7 +272,7 @@ var ProEditableTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
|
272
272
|
* @returns {Promise<{nextList: IRowDataPropsType[], list: IRowDataPropsType[], rowData: IRowDataPropsType, rowIndex: number}>}
|
|
273
273
|
*/
|
|
274
274
|
var onSave = /*#__PURE__*/function () {
|
|
275
|
-
var _ref3 = (0, _asyncToGenerator2.default)(
|
|
275
|
+
var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(rowIndex, callback) {
|
|
276
276
|
var _form$getFieldsValue$, _form$getFieldsValue, nextValues, res, values;
|
|
277
277
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
278
278
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -398,12 +398,12 @@ var ProEditableTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
|
|
|
398
398
|
}, antButtonProps), {}, {
|
|
399
399
|
children: buttonText
|
|
400
400
|
}))]
|
|
401
|
-
}) : (
|
|
401
|
+
}) : (/*#__PURE__*/(0, _react.cloneElement)(buttonText, antButtonProps))
|
|
402
402
|
}) : null
|
|
403
403
|
});
|
|
404
404
|
};
|
|
405
405
|
var validateFields = /*#__PURE__*/function () {
|
|
406
|
-
var _ref4 = (0, _asyncToGenerator2.default)(
|
|
406
|
+
var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3() {
|
|
407
407
|
var values, nextValues, nextList, isEditing;
|
|
408
408
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
|
|
409
409
|
while (1) switch (_context3.prev = _context3.next) {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--zaui-brand : #006aff;
|
|
9
9
|
--zaui-brand-hover : #3387ff;
|
|
10
10
|
--zaui-brand-active : #005ad9;
|
|
11
|
-
--zaui-brand-disabled :
|
|
11
|
+
--zaui-brand-disabled : color-mix(in srgb, var(--zaui-brand) 70%, white);
|
|
12
12
|
--zaui-text : #343434;
|
|
13
13
|
--zaui-text-weak : #616161;
|
|
14
14
|
--zaui-aide-text : #909090;
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
--zaui-table-selected-hover-bg : var(--zaui-table-hover-bg); // 默认同悬停
|
|
56
56
|
--zaui-table-nested-bg : #fafcfe;
|
|
57
57
|
--zaui-contract-bg : #fffaa1; // 对比背景色
|
|
58
|
+
--zaui-contract-bg-add : #d2fff4; // 新增对比背景色
|
|
58
59
|
--zaui-form-label-width : 130px; // 8个全角字符宽度
|
|
59
60
|
--zaui-border-radius : 8px;
|
|
60
61
|
--zaui-border-radius-card : 4px;
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
@zaui-table-selected-hover-bg: var(--zaui-table-hover-bg #fafafa);
|
|
54
54
|
@zaui-table-nested-bg: var(--zaui-table-nested-bg #FAFCFE);
|
|
55
55
|
@zaui-contract-bg: var(--zaui-contract-bg; #fffaa1); // 对比背景色
|
|
56
|
+
@zaui-contract-bg-add: var(--zaui-contract-bg-add; #d2fff4); // 新增对比背景色
|
|
56
57
|
@zaui-form-required-after: var(--zaui-form-required-after; inline);
|
|
57
58
|
@zaui-form-required-before: var(--zaui-form-required-before; none);
|
|
58
59
|
@zaui-form-label-width: var(--zaui-form-label-width; 130px);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isEmpty = void 0;
|
|
7
|
+
var EMPTY_VALUE = [undefined, null, ''];
|
|
8
|
+
/** 判断一个值是否是空值 */
|
|
9
|
+
var isEmpty = exports.isEmpty = function isEmpty(value) {
|
|
10
|
+
if (EMPTY_VALUE.includes(value)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
if (Array.isArray(value)) {
|
|
14
|
+
return !(value === null || value === void 0 ? void 0 : value.length) || value.every(function (item) {
|
|
15
|
+
return EMPTY_VALUE.includes(item);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return false;
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zat-design/sisyphus-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0-beat.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"eslint": "7.10.0",
|
|
103
103
|
"eslint-config-za": "2.1.0",
|
|
104
104
|
"eslint-plugin-babel": "5.3.0",
|
|
105
|
+
"eslint-plugin-complexity": "^1.0.2",
|
|
105
106
|
"eslint-plugin-import": "^2.22.1",
|
|
106
107
|
"eslint-plugin-jsx-a11y": "6.2.3",
|
|
107
108
|
"eslint-plugin-react": "7.16.0",
|
|
@@ -113,6 +114,7 @@
|
|
|
113
114
|
"jest-canvas-mock": "^2.5.2",
|
|
114
115
|
"lint-staged": "^10.0.0",
|
|
115
116
|
"mockjs": "^1.1.0",
|
|
117
|
+
"patch-package": "^8.0.0",
|
|
116
118
|
"prettier": "^2.5.0",
|
|
117
119
|
"pretty-quick": "^3.1.3",
|
|
118
120
|
"react-json-view": "^1.21.3",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
diff --git a/node_modules/rc-table/es/Cell/index.js b/node_modules/rc-table/es/Cell/index.js
|
|
2
|
+
index 4f49ea7..00de314 100644
|
|
3
|
+
--- a/node_modules/rc-table/es/Cell/index.js
|
|
4
|
+
+++ b/node_modules/rc-table/es/Cell/index.js
|
|
5
|
+
@@ -8,6 +8,7 @@ var _excluded = ["colSpan", "rowSpan", "style", "className"];
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import shallowEqual from 'shallowequal';
|
|
9
|
+
+import isEqual from 'rc-util/es/isEqual';
|
|
10
|
+
import { supportRef } from "rc-util/es/ref";
|
|
11
|
+
import { getPathValue, validateValue } from '../utils/valueUtil';
|
|
12
|
+
import StickyContext from '../context/StickyContext';
|
|
13
|
+
@@ -226,16 +227,29 @@ var RefCell = /*#__PURE__*/React.forwardRef(Cell);
|
|
14
|
+
RefCell.displayName = 'Cell';
|
|
15
|
+
var comparePropList = ['expanded', 'className', 'hovering'];
|
|
16
|
+
var MemoCell = /*#__PURE__*/React.memo(RefCell, function (prev, next) {
|
|
17
|
+
+ // if (next.shouldCellUpdate) {
|
|
18
|
+
+ // return (// Additional handle of expanded logic
|
|
19
|
+
+ // comparePropList.every(function (propName) {
|
|
20
|
+
+ // return prev[propName] === next[propName];
|
|
21
|
+
+ // }) && // User control update logic
|
|
22
|
+
+ // !next.shouldCellUpdate(next.record, prev.record)
|
|
23
|
+
+ // );
|
|
24
|
+
+ // }
|
|
25
|
+
+
|
|
26
|
+
+ // return shallowEqual(prev, next);
|
|
27
|
+
+
|
|
28
|
+
if (next.shouldCellUpdate) {
|
|
29
|
+
- return (// Additional handle of expanded logic
|
|
30
|
+
- comparePropList.every(function (propName) {
|
|
31
|
+
- return prev[propName] === next[propName];
|
|
32
|
+
- }) && // User control update logic
|
|
33
|
+
- !next.shouldCellUpdate(next.record, prev.record)
|
|
34
|
+
- );
|
|
35
|
+
+ const [, prevRecord] = prev;
|
|
36
|
+
+ const [, nextRecord] = next;
|
|
37
|
+
+ return next.shouldCellUpdate(nextRecord, prevRecord);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
- return shallowEqual(prev, next);
|
|
41
|
+
+ // Legacy mode should always update
|
|
42
|
+
+ // if (perfRecord.renderWithProps) {
|
|
43
|
+
+ // return true;
|
|
44
|
+
+ // }
|
|
45
|
+
+
|
|
46
|
+
+ return !isEqual(prev, next, true);
|
|
47
|
+
});
|
|
48
|
+
/** Inject hover data here, we still wish MemoCell keep simple `shouldCellUpdate` logic */
|
|
49
|
+
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from 'antd';
|
|
2
|
-
import { NamePath } from 'antd/lib/form/interface';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
interface Props {
|
|
5
|
-
name?: NamePath;
|
|
6
|
-
names?: NamePath[];
|
|
7
|
-
namesStr?: string;
|
|
8
|
-
originalValues?: any;
|
|
9
|
-
form: FormInstance;
|
|
10
|
-
equalWith?: (preValue: any, curValue: any) => boolean | undefined;
|
|
11
|
-
[name: string]: any;
|
|
12
|
-
}
|
|
13
|
-
declare const Changed: React.FC<Props>;
|
|
14
|
-
export default Changed;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import "antd/es/space/style";
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
|
-
import "antd/es/tooltip/style";
|
|
4
|
-
import _Tooltip from "antd/es/tooltip";
|
|
5
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
|
-
var _excluded = ["name", "names", "namesStr", "originalValues", "form", "equalWith", "children", "type", "originalDiffTip"];
|
|
8
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { get } from 'lodash';
|
|
10
|
-
import React, { useMemo } from 'react';
|
|
11
|
-
import { diffOriginal } from '../../utils/diffOriginal';
|
|
12
|
-
var Changed = function Changed(props) {
|
|
13
|
-
var name = props.name,
|
|
14
|
-
names = props.names,
|
|
15
|
-
namesStr = props.namesStr,
|
|
16
|
-
originalValues = props.originalValues,
|
|
17
|
-
form = props.form,
|
|
18
|
-
equalWith = props.equalWith,
|
|
19
|
-
children = props.children,
|
|
20
|
-
type = props.type,
|
|
21
|
-
originalDiffTip = props.originalDiffTip,
|
|
22
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
23
|
-
// 不渲染tooltip
|
|
24
|
-
var notWatch = !originalDiffTip || ['FormList', 'ProEditTable'].includes(type);
|
|
25
|
-
var originalValue = (names === null || names === void 0 ? void 0 : names.length) ? names.map(function (name) {
|
|
26
|
-
return get(originalValues, name);
|
|
27
|
-
}) : get(originalValues, name);
|
|
28
|
-
var noChange = !equalWith && (!originalValues || originalValue === undefined);
|
|
29
|
-
var changed = useMemo(function () {
|
|
30
|
-
if (notWatch || noChange) return false;
|
|
31
|
-
return diffOriginal({
|
|
32
|
-
originalValue: originalValue,
|
|
33
|
-
value: props.value,
|
|
34
|
-
form: form,
|
|
35
|
-
equalWith: equalWith
|
|
36
|
-
// name: namesStr || name,
|
|
37
|
-
});
|
|
38
|
-
}, [notWatch, noChange, props.value, originalValue]);
|
|
39
|
-
var tipContent = useMemo(function () {
|
|
40
|
-
if (notWatch || noChange) return undefined;
|
|
41
|
-
return /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), {}, {
|
|
42
|
-
isView: true,
|
|
43
|
-
value: originalValue,
|
|
44
|
-
checked: type === 'Switch' ? originalValue : undefined
|
|
45
|
-
})) : undefined;
|
|
46
|
-
}, [originalValue, children]);
|
|
47
|
-
if (notWatch || noChange) {
|
|
48
|
-
return /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), rest));
|
|
49
|
-
}
|
|
50
|
-
return _jsx(_Tooltip, {
|
|
51
|
-
open: changed ? undefined : false,
|
|
52
|
-
getPopupContainer: function getPopupContainer(target) {
|
|
53
|
-
return target.parentElement;
|
|
54
|
-
},
|
|
55
|
-
title: _jsxs(_Space, {
|
|
56
|
-
children: ["\u521D\u59CB\u503C\uFF1A", tipContent]
|
|
57
|
-
}),
|
|
58
|
-
children: _jsx("div", {
|
|
59
|
-
className: changed ? 'pro-form-item-changed' : '',
|
|
60
|
-
children: /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), rest)) : undefined
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
export default Changed;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FormInstance } from 'antd';
|
|
2
|
-
import { NamePath } from 'antd/lib/form/interface';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
interface Props {
|
|
5
|
-
name?: NamePath;
|
|
6
|
-
names?: NamePath[];
|
|
7
|
-
namesStr?: string;
|
|
8
|
-
originalValues?: any;
|
|
9
|
-
form: FormInstance;
|
|
10
|
-
equalWith?: (preValue: any, curValue: any) => boolean | undefined;
|
|
11
|
-
[name: string]: any;
|
|
12
|
-
}
|
|
13
|
-
declare const Changed: React.FC<Props>;
|
|
14
|
-
export default Changed;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
var _antd = require("antd");
|
|
13
|
-
var _lodash = require("lodash");
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var _diffOriginal = require("../../utils/diffOriginal");
|
|
16
|
-
var _excluded = ["name", "names", "namesStr", "originalValues", "form", "equalWith", "children", "type", "originalDiffTip"];
|
|
17
|
-
var Changed = function Changed(props) {
|
|
18
|
-
var name = props.name,
|
|
19
|
-
names = props.names,
|
|
20
|
-
namesStr = props.namesStr,
|
|
21
|
-
originalValues = props.originalValues,
|
|
22
|
-
form = props.form,
|
|
23
|
-
equalWith = props.equalWith,
|
|
24
|
-
children = props.children,
|
|
25
|
-
type = props.type,
|
|
26
|
-
originalDiffTip = props.originalDiffTip,
|
|
27
|
-
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
28
|
-
// 不渲染tooltip
|
|
29
|
-
var notWatch = !originalDiffTip || ['FormList', 'ProEditTable'].includes(type);
|
|
30
|
-
var originalValue = (names === null || names === void 0 ? void 0 : names.length) ? names.map(function (name) {
|
|
31
|
-
return (0, _lodash.get)(originalValues, name);
|
|
32
|
-
}) : (0, _lodash.get)(originalValues, name);
|
|
33
|
-
var noChange = !equalWith && (!originalValues || originalValue === undefined);
|
|
34
|
-
var changed = (0, _react.useMemo)(function () {
|
|
35
|
-
if (notWatch || noChange) return false;
|
|
36
|
-
return (0, _diffOriginal.diffOriginal)({
|
|
37
|
-
originalValue: originalValue,
|
|
38
|
-
value: props.value,
|
|
39
|
-
form: form,
|
|
40
|
-
equalWith: equalWith
|
|
41
|
-
// name: namesStr || name,
|
|
42
|
-
});
|
|
43
|
-
}, [notWatch, noChange, props.value, originalValue]);
|
|
44
|
-
var tipContent = (0, _react.useMemo)(function () {
|
|
45
|
-
if (notWatch || noChange) return undefined;
|
|
46
|
-
return /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, children.props), {}, {
|
|
47
|
-
isView: true,
|
|
48
|
-
value: originalValue,
|
|
49
|
-
checked: type === 'Switch' ? originalValue : undefined
|
|
50
|
-
})) : undefined;
|
|
51
|
-
}, [originalValue, children]);
|
|
52
|
-
if (notWatch || noChange) {
|
|
53
|
-
return /*#__PURE__*/_react.default.isValidElement(children) && /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, children.props), rest));
|
|
54
|
-
}
|
|
55
|
-
return (0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
56
|
-
open: changed ? undefined : false,
|
|
57
|
-
getPopupContainer: function getPopupContainer(target) {
|
|
58
|
-
return target.parentElement;
|
|
59
|
-
},
|
|
60
|
-
title: (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
61
|
-
children: ["\u521D\u59CB\u503C\uFF1A", tipContent]
|
|
62
|
-
}),
|
|
63
|
-
children: (0, _jsxRuntime.jsx)("div", {
|
|
64
|
-
className: changed ? 'pro-form-item-changed' : '',
|
|
65
|
-
children: /*#__PURE__*/_react.default.isValidElement(children) ? /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, children.props), rest)) : undefined
|
|
66
|
-
})
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
var _default = exports.default = Changed;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|