@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
|
@@ -44,6 +44,17 @@ export interface ProFormOtherProps {
|
|
|
44
44
|
listName?: any[] | string | number;
|
|
45
45
|
globalControl?: boolean;
|
|
46
46
|
formDisabled?: boolean;
|
|
47
|
+
isDiffChange?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface DiffConfigProps<Values = any> {
|
|
50
|
+
/** 比对原始数据源 */
|
|
51
|
+
originalValues: Values;
|
|
52
|
+
/** 是否显示对比值气泡 */
|
|
53
|
+
toolTip?: boolean;
|
|
54
|
+
/** 变更提示颜色 */
|
|
55
|
+
changeTipColor?: string;
|
|
56
|
+
/** 新增提示颜色 */
|
|
57
|
+
addTipColor?: string;
|
|
47
58
|
}
|
|
48
59
|
export interface ProFormProps<Values = any> extends FormProps<Values> {
|
|
49
60
|
disabled?: boolean;
|
|
@@ -67,14 +78,14 @@ export interface ProFormProps<Values = any> extends FormProps<Values> {
|
|
|
67
78
|
viewEmpty?: React.ReactNode | string;
|
|
68
79
|
confirmLoading?: boolean;
|
|
69
80
|
labelWidth?: string | number;
|
|
70
|
-
originalValues?: Values;
|
|
71
81
|
/** 是否回车提交 */
|
|
72
82
|
submitOnEnter?: boolean;
|
|
73
83
|
clearNotShow?: boolean;
|
|
74
84
|
requiredOnView?: boolean;
|
|
75
85
|
formId?: string;
|
|
76
86
|
required?: boolean | boolean[];
|
|
77
|
-
|
|
87
|
+
/** 表单比对配置 */
|
|
88
|
+
diffConfig?: DiffConfigProps;
|
|
78
89
|
scrollToError?: boolean;
|
|
79
90
|
/** 性能模式,谨慎使用,默认不开启
|
|
80
91
|
* 1. 开启不过滤names的中间态值
|
|
@@ -99,10 +99,12 @@
|
|
|
99
99
|
|
|
100
100
|
&.pro-form-item-width-auto {
|
|
101
101
|
.@{ant-prefix}-form-item-control-input {
|
|
102
|
+
width: 100%;
|
|
102
103
|
flex-grow: inherit;
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
.@{ant-prefix}-form-item-control-input-content {
|
|
107
|
+
width: 100%;
|
|
106
108
|
flex: initial;
|
|
107
109
|
}
|
|
108
110
|
}
|
|
@@ -216,7 +218,7 @@
|
|
|
216
218
|
|
|
217
219
|
.site-input-left,
|
|
218
220
|
.site-input-right {
|
|
219
|
-
width: calc(50% -
|
|
221
|
+
width: calc(50% - 16px);
|
|
220
222
|
}
|
|
221
223
|
|
|
222
224
|
.site-input-left {
|
|
@@ -314,16 +316,23 @@
|
|
|
314
316
|
vertical-align: middle;
|
|
315
317
|
}
|
|
316
318
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
319
|
+
|
|
320
|
+
.pro-form-list-mode-block {
|
|
321
|
+
.pro-collapse-content {
|
|
322
|
+
.@{ant-prefix}-row {
|
|
320
323
|
width: auto;
|
|
321
324
|
}
|
|
322
325
|
}
|
|
323
326
|
}
|
|
324
327
|
|
|
325
|
-
// 比较原始值场景下 不同时的样式
|
|
326
328
|
.pro-form-item-changed {
|
|
329
|
+
border-radius: 4px;
|
|
330
|
+
background: @zaui-contract-bg !important;
|
|
331
|
+
|
|
332
|
+
.@{ant-prefix}-select.@{ant-prefix}-select-disabled .@{ant-prefix}-select-selector{
|
|
333
|
+
background: @zaui-contract-bg !important;
|
|
334
|
+
}
|
|
335
|
+
|
|
327
336
|
span.@{ant-prefix}-input-affix-wrapper,
|
|
328
337
|
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
329
338
|
.@{ant-prefix}-picker,
|
|
@@ -367,10 +376,99 @@
|
|
|
367
376
|
}
|
|
368
377
|
}
|
|
369
378
|
|
|
379
|
+
// checkbox
|
|
380
|
+
.@{ant-prefix}-checkbox-group {
|
|
381
|
+
padding: 5px 0
|
|
382
|
+
}
|
|
383
|
+
// switch
|
|
384
|
+
&:has(.@{ant-prefix}-switch) {
|
|
385
|
+
padding: 5px 0;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// textArea
|
|
389
|
+
.@{ant-prefix}-input-textarea > textarea {
|
|
390
|
+
background: @zaui-contract-bg;
|
|
391
|
+
}
|
|
392
|
+
|
|
370
393
|
.pro-form-view-container {
|
|
371
394
|
padding: 4px 8px;
|
|
372
395
|
background: @zaui-contract-bg;
|
|
373
396
|
border-radius: 4px;
|
|
374
397
|
}
|
|
375
398
|
}
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
// 比较原始值场景下 不同时的样式
|
|
402
|
+
.pro-form-item-add {
|
|
403
|
+
border-radius: 4px;
|
|
404
|
+
background: @zaui-contract-bg-add !important;
|
|
405
|
+
|
|
406
|
+
.@{ant-prefix}-select.@{ant-prefix}-select-disabled .@{ant-prefix}-select-selector{
|
|
407
|
+
background: @zaui-contract-bg-add !important;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
span.@{ant-prefix}-input-affix-wrapper,
|
|
411
|
+
.@{ant-prefix}-select .@{ant-prefix}-select-selector,
|
|
412
|
+
.@{ant-prefix}-picker,
|
|
413
|
+
.@{ant-prefix}-input-number {
|
|
414
|
+
background: @zaui-contract-bg-add !important;
|
|
415
|
+
|
|
416
|
+
input {
|
|
417
|
+
background: transparent !important;
|
|
418
|
+
}
|
|
419
|
+
.@{ant-prefix}-select-selection-placeholder {
|
|
420
|
+
z-index: 9;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.@{ant-prefix}-form-item-control:has(.@{ant-prefix}-switch-handle),
|
|
425
|
+
.@{ant-prefix}-form-item-control:has(.@{ant-prefix}-checkbox-wrapper-in-form-item) {
|
|
426
|
+
background: @zaui-contract-bg-add;
|
|
427
|
+
border-radius: 4px;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// 地址组件
|
|
431
|
+
.@{ant-prefix}-form-item-control-input-content {
|
|
432
|
+
// 查看模式
|
|
433
|
+
& > span {
|
|
434
|
+
border-radius: 4px;
|
|
435
|
+
padding: 5px 8px;
|
|
436
|
+
background: @zaui-contract-bg-add;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
& > .pro-address {
|
|
440
|
+
.@{ant-prefix}-select-selector,
|
|
441
|
+
.@{ant-prefix}-input-affix-wrapper,
|
|
442
|
+
.@{ant-prefix}-input-disabled {
|
|
443
|
+
background: @zaui-contract-bg-add;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
& > .@{ant-prefix}-input-group {
|
|
447
|
+
.forever-checkbox {
|
|
448
|
+
background: @zaui-contract-bg-add;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// checkbox
|
|
454
|
+
.@{ant-prefix}-checkbox-group {
|
|
455
|
+
padding: 5px 0
|
|
456
|
+
}
|
|
457
|
+
// switch
|
|
458
|
+
&:has(.@{ant-prefix}-switch) {
|
|
459
|
+
padding: 5px 0;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// textArea
|
|
463
|
+
.@{ant-prefix}-input-textarea > textarea {
|
|
464
|
+
background: @zaui-contract-bg-add;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
.pro-form-view-container {
|
|
469
|
+
padding: 4px 8px;
|
|
470
|
+
background: @zaui-contract-bg-add;
|
|
471
|
+
border-radius: 4px;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
376
474
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FormInstance } from 'antd';
|
|
2
|
-
interface
|
|
2
|
+
export interface DiffOriginalParams {
|
|
3
3
|
originalValue: any;
|
|
4
4
|
value: any;
|
|
5
5
|
form: FormInstance;
|
|
6
|
-
equalWith?: (originalValue: any, currentValue: any) => boolean;
|
|
6
|
+
equalWith?: (originalValue: any, currentValue: any) => DiffType | boolean | undefined;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type DiffType = 'same' | 'add' | 'changed';
|
|
9
|
+
export declare const diffOriginal: (params: DiffOriginalParams) => DiffType;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.diffOriginal = void 0;
|
|
7
7
|
var _lodash = require("lodash");
|
|
8
|
+
var _utils = require("../../utils");
|
|
8
9
|
var nullValue = [null, undefined, '']; // 输入框空值时可能存在的三种值 视为相等
|
|
9
10
|
var diffOriginal = exports.diffOriginal = function diffOriginal(params) {
|
|
10
11
|
var originalValue = params.originalValue,
|
|
@@ -12,19 +13,29 @@ var diffOriginal = exports.diffOriginal = function diffOriginal(params) {
|
|
|
12
13
|
equalWith = params.equalWith;
|
|
13
14
|
// 支持传入自定义比较事件
|
|
14
15
|
if ((0, _lodash.isFunction)(equalWith)) {
|
|
15
|
-
|
|
16
|
+
var diffRes = equalWith(originalValue, value);
|
|
17
|
+
if (diffRes === undefined) return 'same';
|
|
18
|
+
if (typeof diffRes === 'boolean') {
|
|
19
|
+
return diffRes ? 'same' : 'changed';
|
|
20
|
+
}
|
|
21
|
+
return diffRes;
|
|
22
|
+
}
|
|
23
|
+
// 如果原始值为空 且当前有值的话 认为变更类型是新增
|
|
24
|
+
if ((0, _utils.isEmpty)(originalValue) && !(0, _utils.isEmpty)(value)) {
|
|
25
|
+
return 'add';
|
|
16
26
|
}
|
|
17
27
|
if (Array.isArray(originalValue)) {
|
|
18
|
-
|
|
28
|
+
var isSame = originalValue.every(function (valueItem, index) {
|
|
19
29
|
// 如果两个值有一个不是空值, 则进行深比较
|
|
20
|
-
if (!
|
|
21
|
-
return
|
|
30
|
+
if (!(0, _utils.isEmpty)(value === null || value === void 0 ? void 0 : value[index]) || !(0, _utils.isEmpty)(valueItem)) {
|
|
31
|
+
return (0, _lodash.isEqual)(value === null || value === void 0 ? void 0 : value[index], valueItem);
|
|
22
32
|
}
|
|
23
|
-
return
|
|
33
|
+
return true;
|
|
24
34
|
});
|
|
35
|
+
return isSame ? 'same' : 'changed';
|
|
25
36
|
}
|
|
26
37
|
if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
|
|
27
|
-
return
|
|
38
|
+
return (0, _lodash.isEqual)(value, originalValue) ? 'same' : 'changed';
|
|
28
39
|
}
|
|
29
|
-
return
|
|
40
|
+
return 'same';
|
|
30
41
|
};
|
|
@@ -6,10 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.transformValue = exports.default = void 0;
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
9
|
var _lodash = require("lodash");
|
|
11
10
|
var _utils = require("../utils");
|
|
12
|
-
var
|
|
11
|
+
var _utils2 = require("../../utils");
|
|
13
12
|
var transformValue = exports.transformValue = function transformValue(names, form, fieldName, _normalize, _getValueProps) {
|
|
14
13
|
return {
|
|
15
14
|
normalize: function normalize(value) {
|
|
@@ -29,23 +28,30 @@ var transformValue = exports.transformValue = function transformValue(names, for
|
|
|
29
28
|
return _value;
|
|
30
29
|
},
|
|
31
30
|
getValueProps: function getValueProps(value) {
|
|
31
|
+
var _curValue;
|
|
32
32
|
var _value = [];
|
|
33
33
|
names.forEach(function (name, index) {
|
|
34
34
|
var value = form.getFieldValue(name);
|
|
35
35
|
_value[index] = value;
|
|
36
36
|
});
|
|
37
37
|
// 支持外部传入转换函数
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
var res = (_getValueProps === null || _getValueProps === void 0 ? void 0 : _getValueProps(_value)) || {
|
|
39
|
+
value: _value
|
|
40
|
+
};
|
|
41
|
+
// 如果数组中值都为空, 则值置为空
|
|
42
|
+
var curValue = res === null || res === void 0 ? void 0 : res.value;
|
|
43
43
|
// @ts-ignore
|
|
44
|
-
(0
|
|
44
|
+
if ((_curValue = curValue) === null || _curValue === void 0 ? void 0 : _curValue.every(function (item) {
|
|
45
|
+
return (0, _utils2.isEmpty)(item);
|
|
46
|
+
})) {
|
|
47
|
+
curValue = undefined;
|
|
48
|
+
}
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
(0, _lodash.set)(form.getFieldsValue(true), fieldName, curValue);
|
|
45
51
|
// 如果表单里的值和组合得到的值不全等 更新表单里的值、
|
|
46
|
-
return (0, _objectSpread2.default)({
|
|
47
|
-
value:
|
|
48
|
-
}
|
|
52
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, res), {}, {
|
|
53
|
+
value: curValue
|
|
54
|
+
});
|
|
49
55
|
},
|
|
50
56
|
shouldUpdate: function shouldUpdate(prevValues, curValues) {
|
|
51
57
|
return (0, _utils.diffField)(prevValues, curValues, names);
|
|
@@ -44,7 +44,7 @@ var useForm = exports.useForm = function useForm(originForm, options) {
|
|
|
44
44
|
return getFieldsValue(nameList, filterFunc);
|
|
45
45
|
};
|
|
46
46
|
var _validateFields = /*#__PURE__*/function () {
|
|
47
|
-
var _ref2 = (0, _asyncToGenerator2.default)(
|
|
47
|
+
var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(nameList) {
|
|
48
48
|
var _rest$,
|
|
49
49
|
_len,
|
|
50
50
|
rest,
|
|
@@ -3,7 +3,7 @@ import { ProColumnProps, ProRule } from '../components/render/propsType';
|
|
|
3
3
|
interface Result<Values> {
|
|
4
4
|
shouldUpdate?: FormItemProps<Values>['shouldUpdate'];
|
|
5
5
|
show?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
6
|
+
disabled?: boolean | boolean[];
|
|
7
7
|
rules?: ProRule[];
|
|
8
8
|
required?: boolean;
|
|
9
9
|
[key: string]: any;
|
|
@@ -15,7 +15,7 @@ interface UseShouldUpdateProps<Values> {
|
|
|
15
15
|
names?: any[];
|
|
16
16
|
};
|
|
17
17
|
form?: FormInstance<Values>;
|
|
18
|
-
disabled?:
|
|
18
|
+
disabled?: boolean;
|
|
19
19
|
rules?: ProRule[];
|
|
20
20
|
required?: boolean;
|
|
21
21
|
type: string;
|
|
@@ -70,7 +70,7 @@ var useShouldUpdate = function useShouldUpdate(props) {
|
|
|
70
70
|
}
|
|
71
71
|
if ((0, _lodash.isFunction)(disabled)) {
|
|
72
72
|
// RangePicker返回数组时,特殊处理
|
|
73
|
-
if (
|
|
73
|
+
if (['Group', 'RangePicker'].includes(type) && Array.isArray(disabled(values, {
|
|
74
74
|
form: form,
|
|
75
75
|
index: index,
|
|
76
76
|
namePath: namePath
|
package/lib/ProSelect/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var _ = require("..");
|
|
|
21
21
|
var _locale = _interopRequireDefault(require("../locale"));
|
|
22
22
|
var _utils = require("./utils");
|
|
23
23
|
require("./index.less");
|
|
24
|
-
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "filterInList", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "isView"];
|
|
24
|
+
var _excluded = ["dataSource", "defaultDisableValue", "useRequest", "fieldNames", "tooltip", "otherProps", "labelInValue", "filterInList", "scrollFollowParent", "defaultOne", "onSearch", "optionRender", "onChange", "updateDataSource", "transformResponse", "getValueProps", "isView"];
|
|
25
25
|
var Option = _antd.Select.Option;
|
|
26
26
|
var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
27
27
|
var _selectProps$showCode, _locale$ProSelect;
|
|
@@ -54,10 +54,11 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
54
54
|
onChange = props.onChange,
|
|
55
55
|
updateDataSource = props.updateDataSource,
|
|
56
56
|
transformResponse = props.transformResponse,
|
|
57
|
+
getValueProps = props.getValueProps,
|
|
57
58
|
isViewPro = props.isView,
|
|
58
59
|
selectProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
59
60
|
selectProps.showCodeName = (_selectProps$showCode = selectProps.showCodeName) !== null && _selectProps$showCode !== void 0 ? _selectProps$showCode : showCodeName;
|
|
60
|
-
var value = props.value;
|
|
61
|
+
var value = getValueProps && props.value ? getValueProps(props.value) : props.value;
|
|
61
62
|
var _ref2 = _.ProForm.useFieldProps() || {},
|
|
62
63
|
isViewCon = _ref2.isView,
|
|
63
64
|
viewEmpty = _ref2.viewEmpty;
|
|
@@ -217,6 +218,7 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
217
218
|
return props.children;
|
|
218
219
|
};
|
|
219
220
|
var handleChange = function handleChange(value, option) {
|
|
221
|
+
var getChangeValue = selectProps.getChangeValue;
|
|
220
222
|
if (selectProps.mode && selectProps.mode === 'multiple') {
|
|
221
223
|
if (Array.isArray(option)) {
|
|
222
224
|
option.forEach(function (item) {
|
|
@@ -226,14 +228,14 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
226
228
|
});
|
|
227
229
|
}
|
|
228
230
|
if (labelInValue) {
|
|
229
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(getValueObject(value), option);
|
|
231
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(getChangeValue ? getChangeValue(getValueObject(value)) : getValueObject(value), option);
|
|
230
232
|
} else {
|
|
231
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(value, option);
|
|
233
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(getChangeValue ? getChangeValue(value) : value, option);
|
|
232
234
|
}
|
|
233
235
|
} else if (!selectProps.mode && labelInValue) {
|
|
234
|
-
onChange(getValueObject(value), option);
|
|
236
|
+
onChange(getChangeValue ? getChangeValue(getValueObject(value)) : getValueObject(value), option);
|
|
235
237
|
} else {
|
|
236
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(value, option === null || option === void 0 ? void 0 : option.record);
|
|
238
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(getChangeValue ? getChangeValue(value) : value, option === null || option === void 0 ? void 0 : option.record);
|
|
237
239
|
}
|
|
238
240
|
};
|
|
239
241
|
/**
|
|
@@ -279,7 +281,7 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
279
281
|
if ((otherProps === null || otherProps === void 0 ? void 0 : otherProps.listName) && filterInList) {
|
|
280
282
|
newSelectList = (0, _utils.getSelectList)({
|
|
281
283
|
otherProps: otherProps,
|
|
282
|
-
value:
|
|
284
|
+
value: value,
|
|
283
285
|
dataSource: selectList,
|
|
284
286
|
labelInValue: labelInValue,
|
|
285
287
|
fieldNames: fieldNames,
|
|
@@ -295,8 +297,8 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
295
297
|
showArrow: true,
|
|
296
298
|
loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading,
|
|
297
299
|
onChange: handleChange,
|
|
298
|
-
optionLabelProp:
|
|
299
|
-
|
|
300
|
+
optionLabelProp: (otherProps === null || otherProps === void 0 ? void 0 : otherProps.isDiffChange) ? 'label' : 'children',
|
|
301
|
+
// optionLabelProp="label" // 解决warning报错,添加默认值
|
|
300
302
|
showSearch: true,
|
|
301
303
|
filterOption: (0, _lodash.isFunction)(_onSearch) ? false : function (input, option) {
|
|
302
304
|
var _option$children, _option$children$prop;
|
|
@@ -313,16 +315,15 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
313
315
|
value: transformValue(),
|
|
314
316
|
children: Array.isArray(newSelectList) && newSelectList.map(function (item) {
|
|
315
317
|
return (0, _jsxRuntime.jsx)(Option, {
|
|
318
|
+
label: item[label],
|
|
316
319
|
value: item[code],
|
|
317
320
|
record: item,
|
|
318
321
|
disabled: !!item.disabled,
|
|
319
322
|
children: (0, _jsxRuntime.jsx)(TooltipOption, {
|
|
320
323
|
title: OptionRender ? OptionRender(item) : selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label],
|
|
321
324
|
children: OptionRender ? (0, _jsxRuntime.jsx)("span", {
|
|
322
|
-
title: OptionRender(item),
|
|
323
325
|
children: OptionRender(item)
|
|
324
326
|
}) : (0, _jsxRuntime.jsx)("span", {
|
|
325
|
-
title: selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label],
|
|
326
327
|
children: selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label]
|
|
327
328
|
})
|
|
328
329
|
}, item[code])
|
|
@@ -46,6 +46,10 @@ export interface PropSelectProps extends Omit<SelectProps, 'onSearch'> {
|
|
|
46
46
|
onSearch?: (value: string, useRequest: Result<any, any>) => void;
|
|
47
47
|
/** 自定义展示 */
|
|
48
48
|
optionRender?: (value: DataOption) => string | ReactNode;
|
|
49
|
+
/** 用来转换修改value值 和 getValueProps配合使用 */
|
|
50
|
+
getChangeValue?: (value: DataOption) => any;
|
|
51
|
+
/** 用来转换传入的value值 getChangeValue配合使用 */
|
|
52
|
+
getValueProps?: (value: DataOption) => any;
|
|
49
53
|
}
|
|
50
54
|
export interface ProSelectAction {
|
|
51
55
|
/** 实例方法、根据 code | code[] 批量获取数据 */
|
|
@@ -38,7 +38,7 @@ var findSelectNameValues = function findSelectNameValues(_ref) {
|
|
|
38
38
|
_iterator.f();
|
|
39
39
|
}
|
|
40
40
|
if (mode === 'multiple') {
|
|
41
|
-
selectValues = [].concat((0, _toConsumableArray2.default)(selectValues), (0, _toConsumableArray2.default)(result));
|
|
41
|
+
selectValues = [].concat((0, _toConsumableArray2.default)(selectValues), (0, _toConsumableArray2.default)(result || []));
|
|
42
42
|
} else {
|
|
43
43
|
selectValues.push(result);
|
|
44
44
|
}
|
|
@@ -61,13 +61,14 @@ var getSelectList = exports.getSelectList = function getSelectList(_ref2) {
|
|
|
61
61
|
if (!otherProps) {
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
-
var
|
|
64
|
+
var name = otherProps.name,
|
|
65
|
+
listName = otherProps.listName,
|
|
65
66
|
form = otherProps.form;
|
|
66
67
|
var firstNumberIndex = listName.lastIndexOf(listName.findLast(function (item) {
|
|
67
68
|
return typeof item === 'number';
|
|
68
69
|
}));
|
|
69
|
-
var fatherName = listName.slice(0, firstNumberIndex);
|
|
70
|
-
var selectName = listName.slice(firstNumberIndex + 1);
|
|
70
|
+
var fatherName = (name || listName).slice(0, firstNumberIndex);
|
|
71
|
+
var selectName = (name || listName).slice(firstNumberIndex + 1);
|
|
71
72
|
return findSelectNameValues({
|
|
72
73
|
list: form.getFieldValue(fatherName) || [],
|
|
73
74
|
selectName: selectName,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const _default: ({ children, delayTime, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
2
|
+
declare const _default: ({ children, delayTime, excludes, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
3
3
|
export default _default;
|
|
@@ -12,22 +12,25 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
12
12
|
var _lodash = require("lodash");
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
14
|
var _index = require("../../index");
|
|
15
|
-
var _excluded = ["children", "delayTime"];
|
|
15
|
+
var _excluded = ["children", "delayTime", "excludes"];
|
|
16
16
|
var _default = exports.default = function _default(_ref) {
|
|
17
17
|
var children = _ref.children,
|
|
18
18
|
delayTime = _ref.delayTime,
|
|
19
|
+
excludes = _ref.excludes,
|
|
19
20
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
20
21
|
var _useStep = (0, _index.useStep)(),
|
|
21
22
|
notify = _useStep.notify;
|
|
22
23
|
return /*#__PURE__*/_react.default.cloneElement(children, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
23
|
-
onClick: (0, _lodash.throttle)(
|
|
24
|
+
onClick: (0, _lodash.throttle)(/*#__PURE__*/(0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
24
25
|
var values;
|
|
25
26
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
26
27
|
while (1) switch (_context.prev = _context.next) {
|
|
27
28
|
case 0:
|
|
28
29
|
localStorage.setItem('cache-pro-step', '');
|
|
29
30
|
_context.next = 3;
|
|
30
|
-
return notify === null || notify === void 0 ? void 0 : notify(
|
|
31
|
+
return notify === null || notify === void 0 ? void 0 : notify({
|
|
32
|
+
excludes: excludes
|
|
33
|
+
});
|
|
31
34
|
case 3:
|
|
32
35
|
values = _context.sent;
|
|
33
36
|
setTimeout(function () {
|
package/lib/ProStep/index.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ declare const ProStep: {
|
|
|
7
7
|
({ children, ...resetProps }: ProStepPropsType): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
useStep: () => any;
|
|
9
9
|
Item: ({ id, title, collapse: collapseItem, children, ...restProps }: import("./propsType").ProStepItem) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
Listener: ({ children, delayTime, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>;
|
|
10
|
+
Listener: ({ children, delayTime, excludes, ...props }: any) => import("react").DetailedReactHTMLElement<any, HTMLElement>;
|
|
11
11
|
};
|
|
12
12
|
export default ProStep;
|
package/lib/ProStep/index.js
CHANGED
|
@@ -89,7 +89,7 @@ var ProStep = function ProStep(_ref) {
|
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
91
|
var subEvent = /*#__PURE__*/function () {
|
|
92
|
-
var _ref5 = (0, _asyncToGenerator2.default)(
|
|
92
|
+
var _ref5 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
93
93
|
var value, _form$validateFields, _error$errorFields;
|
|
94
94
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
95
95
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -135,47 +135,54 @@ var ProStep = function ProStep(_ref) {
|
|
|
135
135
|
registerMap.current[id] = record;
|
|
136
136
|
};
|
|
137
137
|
var notify = /*#__PURE__*/function () {
|
|
138
|
-
var _ref6 = (0, _asyncToGenerator2.default)(
|
|
139
|
-
var events, res, nextErrorCollection;
|
|
138
|
+
var _ref6 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(params) {
|
|
139
|
+
var _ref7, excludes, triggerIds, events, res, nextErrorCollection;
|
|
140
140
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
141
141
|
while (1) switch (_context2.prev = _context2.next) {
|
|
142
142
|
case 0:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
_ref7 = params || {}, excludes = _ref7.excludes;
|
|
144
|
+
triggerIds = Object.keys(registerMap.current); // 排除指定模块不触发校验
|
|
145
|
+
if (excludes === null || excludes === void 0 ? void 0 : excludes.length) {
|
|
146
|
+
triggerIds = triggerIds.filter(function (id) {
|
|
147
|
+
return !excludes.includes(id);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
events = triggerIds.map(function (id) {
|
|
151
|
+
var _registerMap$current$, _registerMap$current$2;
|
|
152
|
+
return (_registerMap$current$ = registerMap.current[id]) === null || _registerMap$current$ === void 0 ? void 0 : (_registerMap$current$2 = _registerMap$current$.subEvent) === null || _registerMap$current$2 === void 0 ? void 0 : _registerMap$current$2.call(_registerMap$current$);
|
|
146
153
|
});
|
|
147
|
-
_context2.next =
|
|
154
|
+
_context2.next = 6;
|
|
148
155
|
return Promise.all(events);
|
|
149
|
-
case
|
|
156
|
+
case 6:
|
|
150
157
|
res = _context2.sent;
|
|
151
158
|
nextErrorCollection = {};
|
|
152
|
-
|
|
153
|
-
var
|
|
154
|
-
errorFields =
|
|
159
|
+
triggerIds.forEach(function (id, index) {
|
|
160
|
+
var _ref8 = (res === null || res === void 0 ? void 0 : res[index]) || {},
|
|
161
|
+
errorFields = _ref8.errorFields;
|
|
155
162
|
nextErrorCollection[id] = (errorFields === null || errorFields === void 0 ? void 0 : errorFields.length) || 0;
|
|
156
163
|
});
|
|
157
164
|
setErrorCollection(nextErrorCollection);
|
|
158
165
|
return _context2.abrupt("return", res);
|
|
159
|
-
case
|
|
166
|
+
case 11:
|
|
160
167
|
case "end":
|
|
161
168
|
return _context2.stop();
|
|
162
169
|
}
|
|
163
170
|
}, _callee2);
|
|
164
171
|
}));
|
|
165
|
-
return function notify() {
|
|
172
|
+
return function notify(_x) {
|
|
166
173
|
return _ref6.apply(this, arguments);
|
|
167
174
|
};
|
|
168
175
|
}();
|
|
169
176
|
var triggerTo = /*#__PURE__*/function () {
|
|
170
|
-
var
|
|
177
|
+
var _ref9 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3(keys) {
|
|
171
178
|
var events, result, nextErrorCollection;
|
|
172
179
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
|
|
173
180
|
while (1) switch (_context3.prev = _context3.next) {
|
|
174
181
|
case 0:
|
|
175
182
|
events = [];
|
|
176
183
|
keys === null || keys === void 0 ? void 0 : keys.forEach(function (key) {
|
|
177
|
-
var _registerMap$current, _registerMap$current
|
|
178
|
-
events.push(registerMap === null || registerMap === void 0 ? void 0 : (_registerMap$current = registerMap.current) === null || _registerMap$current === void 0 ? void 0 : (_registerMap$current$ = _registerMap$current[key]) === null || _registerMap$current$ === void 0 ? void 0 : (_registerMap$current$
|
|
184
|
+
var _registerMap$current, _registerMap$current$3, _registerMap$current$4;
|
|
185
|
+
events.push(registerMap === null || registerMap === void 0 ? void 0 : (_registerMap$current = registerMap.current) === null || _registerMap$current === void 0 ? void 0 : (_registerMap$current$3 = _registerMap$current[key]) === null || _registerMap$current$3 === void 0 ? void 0 : (_registerMap$current$4 = _registerMap$current$3.subEvent) === null || _registerMap$current$4 === void 0 ? void 0 : _registerMap$current$4.call(_registerMap$current$3));
|
|
179
186
|
});
|
|
180
187
|
_context3.next = 4;
|
|
181
188
|
return Promise.all(events);
|
|
@@ -197,8 +204,8 @@ var ProStep = function ProStep(_ref) {
|
|
|
197
204
|
}
|
|
198
205
|
}, _callee3);
|
|
199
206
|
}));
|
|
200
|
-
return function triggerTo(
|
|
201
|
-
return
|
|
207
|
+
return function triggerTo(_x2) {
|
|
208
|
+
return _ref9.apply(this, arguments);
|
|
202
209
|
};
|
|
203
210
|
}();
|
|
204
211
|
(0, _ahooks.useDeepCompareEffect)(function () {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ProTableColumn } from '../../propsType';
|
|
3
|
-
export declare const formatColumn: (column
|
|
3
|
+
export declare const formatColumn: ({ column, originalObj, dataSourceObj, rowKey, diffToolTip, }: {
|
|
4
|
+
column: ProTableColumn;
|
|
5
|
+
originalObj: any;
|
|
6
|
+
dataSourceObj: any;
|
|
7
|
+
rowKey: any;
|
|
8
|
+
diffToolTip?: boolean;
|
|
9
|
+
}) => void;
|
|
4
10
|
/**
|
|
5
11
|
* 查找最近的父级className
|
|
6
12
|
* @param element 当前node节点
|