@zat-design/sisyphus-react 3.4.5-beta.9 → 3.4.6-beta.1
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 +70 -16
- package/dist/less.esm.css +70 -16
- package/es/ProEditTable/components/RenderField/index.js +55 -48
- package/es/ProEditTable/index.js +2 -2
- package/es/ProEditTable/style/index.less +0 -5
- package/es/ProEditTable/utils/tools.d.ts +12 -0
- package/es/ProEditTable/utils/tools.js +79 -2
- package/es/ProForm/components/base/RangePicker/index.js +9 -9
- package/es/ProForm/components/combination/ProCascader/index.js +5 -4
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/ProCascader/utils/index.d.ts +14 -0
- package/es/ProForm/components/combination/ProCascader/utils/index.js +26 -0
- package/es/ProForm/components/combination/ProModalSelect/index.js +10 -1
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +23 -0
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProRangeLimit/index.js +17 -10
- package/es/ProForm/components/render/Render.js +17 -12
- package/es/ProForm/components/render/RenderFields.js +3 -1
- package/es/ProForm/index.js +4 -0
- package/es/ProForm/propsType.d.ts +2 -0
- package/es/ProForm/style/index.less +1 -0
- package/es/ProForm/utils/index.js +3 -0
- package/es/ProForm/utils/useChanged.js +1 -2
- package/es/ProForm/utils/useForm.js +18 -6
- package/es/ProForm/utils/useListChanged.js +1 -3
- package/es/ProIcon/index.js +107 -42
- package/es/ProIcon/propsTypes.d.ts +1 -1
- package/es/ProIcon/utils/index.d.ts +0 -1
- package/es/ProIcon/utils/index.js +0 -31
- package/es/ProStep/components/Step/index.js +1 -1
- package/es/ProStep/style/index.less +17 -0
- package/es/ProThemeTools/component/PrdTools/index.js +2 -1
- package/es/ProTree/components/ProTree.js +96 -74
- package/es/ProTree/components/ProTreeSelect/index.js +3 -7
- package/es/ProTree/components/Tree.js +63 -41
- package/es/ProTree/style/index.less +24 -17
- package/es/ProUpload/index.js +11 -13
- package/es/ProUpload/propsType.d.ts +8 -3
- package/es/assets/view.svg +2 -2
- package/lib/ProEditTable/components/RenderField/index.js +52 -45
- package/lib/ProEditTable/index.js +2 -2
- package/lib/ProEditTable/style/index.less +0 -5
- package/lib/ProEditTable/utils/tools.d.ts +12 -0
- package/lib/ProEditTable/utils/tools.js +80 -2
- package/lib/ProForm/components/base/RangePicker/index.js +9 -9
- package/lib/ProForm/components/combination/ProCascader/index.js +6 -5
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/ProCascader/utils/index.d.ts +14 -0
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +33 -0
- package/lib/ProForm/components/combination/ProModalSelect/index.js +9 -0
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +23 -0
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +17 -10
- package/lib/ProForm/components/render/Render.js +17 -12
- package/lib/ProForm/components/render/RenderFields.js +3 -1
- package/lib/ProForm/index.js +4 -0
- package/lib/ProForm/propsType.d.ts +2 -0
- package/lib/ProForm/style/index.less +1 -0
- package/lib/ProForm/utils/index.js +3 -0
- package/lib/ProForm/utils/useChanged.js +1 -2
- package/lib/ProForm/utils/useForm.js +18 -6
- package/lib/ProForm/utils/useListChanged.js +1 -3
- package/lib/ProIcon/index.js +103 -38
- package/lib/ProIcon/propsTypes.d.ts +1 -1
- package/lib/ProIcon/utils/index.d.ts +0 -1
- package/lib/ProIcon/utils/index.js +1 -32
- package/lib/ProStep/components/Step/index.js +1 -1
- package/lib/ProStep/style/index.less +17 -0
- package/lib/ProThemeTools/component/PrdTools/index.js +2 -1
- package/lib/ProTree/components/ProTree.js +96 -74
- package/lib/ProTree/components/ProTreeSelect/index.js +3 -7
- package/lib/ProTree/components/Tree.js +63 -41
- package/lib/ProTree/style/index.less +24 -17
- package/lib/ProUpload/index.js +10 -12
- package/lib/ProUpload/propsType.d.ts +8 -3
- package/lib/assets/view.svg +2 -2
- package/package.json +2 -2
- package/coverage/lcov-report/src/.umi/core/devScripts.ts.html +0 -241
- package/coverage/lcov-report/src/.umi/core/history.ts.html +0 -148
- package/coverage/lcov-report/src/.umi/core/index.html +0 -206
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +0 -109
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +0 -160
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +0 -97
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +0 -26050
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +0 -112
- package/coverage/lcov-report/src/.umi/dumi/demos/index.html +0 -116
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +0 -6340
- package/coverage/lcov-report/src/.umi/dumi/index.html +0 -116
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +0 -109
- package/coverage/lcov-report/src/.umi/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +0 -172
- package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +0 -94
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +0 -196
- package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +0 -106
- package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +0 -146
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +0 -88
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +0 -124
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +0 -1246
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +0 -161
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +0 -268
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +0 -778
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +0 -115
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +0 -202
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +0 -97
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +0 -142
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +0 -334
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +0 -146
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +0 -146
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +0 -121
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +0 -298
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +0 -116
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +0 -919
- package/coverage/lcov-report/src/.umi/umi.ts.html +0 -268
package/dist/index.esm.css
CHANGED
|
@@ -1500,6 +1500,32 @@
|
|
|
1500
1500
|
width: 48px;
|
|
1501
1501
|
height: 24px;
|
|
1502
1502
|
}
|
|
1503
|
+
.pro-step > .step-menu > .anticon > button {
|
|
1504
|
+
width: auto !important;
|
|
1505
|
+
height: auto !important;
|
|
1506
|
+
}
|
|
1507
|
+
.pro-step > .step-menu > .anticon > button > .menu-icon {
|
|
1508
|
+
width: auto !important;
|
|
1509
|
+
height: auto !important;
|
|
1510
|
+
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
1511
|
+
fill: var(--zaui-brand, #006aff);
|
|
1512
|
+
}
|
|
1513
|
+
.pro-step > .step-menu > .anticon > button > .menu-icon > div {
|
|
1514
|
+
display: -webkit-box;
|
|
1515
|
+
display: -webkit-flex;
|
|
1516
|
+
display: -ms-flexbox;
|
|
1517
|
+
display: flex;
|
|
1518
|
+
-webkit-box-align: center;
|
|
1519
|
+
-webkit-align-items: center;
|
|
1520
|
+
-ms-flex-align: center;
|
|
1521
|
+
align-items: center;
|
|
1522
|
+
-webkit-box-pack: center;
|
|
1523
|
+
-webkit-justify-content: center;
|
|
1524
|
+
-ms-flex-pack: center;
|
|
1525
|
+
justify-content: center;
|
|
1526
|
+
width: 48px;
|
|
1527
|
+
height: 24px;
|
|
1528
|
+
}
|
|
1503
1529
|
.pro-step > .step-menu > .menu-icon {
|
|
1504
1530
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
1505
1531
|
fill: var(--zaui-brand, #006aff);
|
|
@@ -2336,6 +2362,19 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2336
2362
|
.pro-tree-modal .ant-input-group-wrapper:hover .ant-input-disabled + span .close-icon {
|
|
2337
2363
|
display: none;
|
|
2338
2364
|
}
|
|
2365
|
+
.pro-modal-select .ant-input-affix-wrapper,
|
|
2366
|
+
.pro-tree-modal .ant-input-affix-wrapper {
|
|
2367
|
+
border-top-right-radius: 0;
|
|
2368
|
+
border-bottom-right-radius: 0;
|
|
2369
|
+
}
|
|
2370
|
+
.pro-modal-select .ant-input-affix-wrapper.ant-input-affix-wrapper-status-error + .ant-btn,
|
|
2371
|
+
.pro-tree-modal .ant-input-affix-wrapper.ant-input-affix-wrapper-status-error + .ant-btn {
|
|
2372
|
+
border: 1px solid var(--ant-error-color);
|
|
2373
|
+
}
|
|
2374
|
+
.pro-modal-select .ant-input-affix-wrapper.ant-input-affix-wrapper-status-error + .ant-btn > .viewSvg,
|
|
2375
|
+
.pro-tree-modal .ant-input-affix-wrapper.ant-input-affix-wrapper-status-error + .ant-btn > .viewSvg {
|
|
2376
|
+
color: var(--ant-error-color);
|
|
2377
|
+
}
|
|
2339
2378
|
.pro-modal-select .pro-tree-modal-input-appoint .ant-input,
|
|
2340
2379
|
.pro-tree-modal .pro-tree-modal-input-appoint .ant-input {
|
|
2341
2380
|
border-top-left-radius: 0;
|
|
@@ -2367,6 +2406,14 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2367
2406
|
cursor: pointer;
|
|
2368
2407
|
fill: #c5c7cd;
|
|
2369
2408
|
}
|
|
2409
|
+
.pro-modal-select .ant-select-status-error + .ant-btn,
|
|
2410
|
+
.pro-tree-modal .ant-select-status-error + .ant-btn {
|
|
2411
|
+
border: 1px solid var(--ant-error-color);
|
|
2412
|
+
}
|
|
2413
|
+
.pro-modal-select .ant-select-status-error + .ant-btn > .viewSvg,
|
|
2414
|
+
.pro-tree-modal .ant-select-status-error + .ant-btn > .viewSvg {
|
|
2415
|
+
color: var(--ant-error-color);
|
|
2416
|
+
}
|
|
2370
2417
|
.pro-modal-select .ant-input-group-addon,
|
|
2371
2418
|
.pro-tree-modal .ant-input-group-addon {
|
|
2372
2419
|
padding: 0px var(--zaui-space-size-sm, 8px);
|
|
@@ -2888,6 +2935,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2888
2935
|
overflow: hidden;
|
|
2889
2936
|
white-space: nowrap;
|
|
2890
2937
|
text-overflow: ellipsis;
|
|
2938
|
+
width: 100%;
|
|
2891
2939
|
}
|
|
2892
2940
|
.pro-form .full-form-item {
|
|
2893
2941
|
width: 100%;
|
|
@@ -3583,6 +3631,28 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3583
3631
|
.pro-tree {
|
|
3584
3632
|
height: 100%;
|
|
3585
3633
|
}
|
|
3634
|
+
.pro-tree .ant-tree-node-content-wrapper {
|
|
3635
|
+
display: -webkit-box;
|
|
3636
|
+
display: -webkit-flex;
|
|
3637
|
+
display: -ms-flexbox;
|
|
3638
|
+
display: flex;
|
|
3639
|
+
-webkit-box-align: baseline;
|
|
3640
|
+
-webkit-align-items: baseline;
|
|
3641
|
+
-ms-flex-align: baseline;
|
|
3642
|
+
align-items: baseline;
|
|
3643
|
+
}
|
|
3644
|
+
.pro-tree .ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper {
|
|
3645
|
+
color: var(--zaui-text);
|
|
3646
|
+
}
|
|
3647
|
+
.pro-tree .ant-tree .ant-tree-treenode-disabled .pro-tree-tree-node.checked {
|
|
3648
|
+
color: var(--zaui-text);
|
|
3649
|
+
}
|
|
3650
|
+
.pro-tree .ant-tree .ant-tree-treenode-disabled .pro-tree-tree-node.checked .brand-bg-opa-ten {
|
|
3651
|
+
background-color: inherit;
|
|
3652
|
+
}
|
|
3653
|
+
.pro-tree .ant-select-dropdown.pro-tree-select-drop-down-container.checkable-tree {
|
|
3654
|
+
overflow: hidden!important;
|
|
3655
|
+
}
|
|
3586
3656
|
.pro-tree .ant-spin-nested-loading {
|
|
3587
3657
|
height: 100%;
|
|
3588
3658
|
}
|
|
@@ -3899,15 +3969,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3899
3969
|
background-color: var(--zaui-brand);
|
|
3900
3970
|
opacity: 0.08;
|
|
3901
3971
|
}
|
|
3902
|
-
.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper {
|
|
3903
|
-
color: var(--zaui-text);
|
|
3904
|
-
}
|
|
3905
|
-
.ant-tree .ant-tree-treenode-disabled .pro-tree-tree-node.checked {
|
|
3906
|
-
color: var(--zaui-text);
|
|
3907
|
-
}
|
|
3908
|
-
.ant-tree .ant-tree-treenode-disabled .pro-tree-tree-node.checked .brand-bg-opa-ten {
|
|
3909
|
-
background-color: inherit;
|
|
3910
|
-
}
|
|
3911
3972
|
.pro-form.pro-form-view .ant-form-item .pro-tree * {
|
|
3912
3973
|
line-height: 1 !important;
|
|
3913
3974
|
height: auto !important;
|
|
@@ -3922,9 +3983,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3922
3983
|
.pro-form.pro-form-view .ant-form-item .pro-tree .ant-tree-checkbox * {
|
|
3923
3984
|
height: 16px !important;
|
|
3924
3985
|
}
|
|
3925
|
-
.ant-select-dropdown.pro-tree-select-drop-down-container.checkable-tree {
|
|
3926
|
-
overflow: hidden!important;
|
|
3927
|
-
}
|
|
3928
3986
|
.pro-drawer .pro-drawer-close {
|
|
3929
3987
|
position: absolute;
|
|
3930
3988
|
top: 6px;
|
|
@@ -4163,10 +4221,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4163
4221
|
.pro-edit-table .ant-space .ant-btn-link:first-child {
|
|
4164
4222
|
padding-left: 0;
|
|
4165
4223
|
}
|
|
4166
|
-
.pro-edit-table .ant-table-header > table .ant-table-thead > tr > th.ant-table-selection-column {
|
|
4167
|
-
padding-left: var(--zaui-space-size-md, 16px);
|
|
4168
|
-
padding-right: var(--zaui-space-size-md, 16px);
|
|
4169
|
-
}
|
|
4170
4224
|
.pro-edit-table .ant-table-header > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-right .pro-edit-table-title::before {
|
|
4171
4225
|
position: static;
|
|
4172
4226
|
top: 0;
|
package/dist/less.esm.css
CHANGED
|
@@ -1500,6 +1500,32 @@
|
|
|
1500
1500
|
width: 48px;
|
|
1501
1501
|
height: 24px;
|
|
1502
1502
|
}
|
|
1503
|
+
.pro-step > .step-menu > .anticon > button {
|
|
1504
|
+
width: auto !important;
|
|
1505
|
+
height: auto !important;
|
|
1506
|
+
}
|
|
1507
|
+
.pro-step > .step-menu > .anticon > button > .menu-icon {
|
|
1508
|
+
width: auto !important;
|
|
1509
|
+
height: auto !important;
|
|
1510
|
+
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
1511
|
+
fill: var(--zaui-brand, #006aff);
|
|
1512
|
+
}
|
|
1513
|
+
.pro-step > .step-menu > .anticon > button > .menu-icon > div {
|
|
1514
|
+
display: -webkit-box;
|
|
1515
|
+
display: -webkit-flex;
|
|
1516
|
+
display: -ms-flexbox;
|
|
1517
|
+
display: flex;
|
|
1518
|
+
-webkit-box-align: center;
|
|
1519
|
+
-webkit-align-items: center;
|
|
1520
|
+
-ms-flex-align: center;
|
|
1521
|
+
align-items: center;
|
|
1522
|
+
-webkit-box-pack: center;
|
|
1523
|
+
-webkit-justify-content: center;
|
|
1524
|
+
-ms-flex-pack: center;
|
|
1525
|
+
justify-content: center;
|
|
1526
|
+
width: 48px;
|
|
1527
|
+
height: 24px;
|
|
1528
|
+
}
|
|
1503
1529
|
.pro-step > .step-menu > .menu-icon {
|
|
1504
1530
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
1505
1531
|
fill: var(--zaui-brand, #006aff);
|
|
@@ -2336,6 +2362,19 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2336
2362
|
.pro-tree-modal .ant-input-group-wrapper:hover .ant-input-disabled + span .close-icon {
|
|
2337
2363
|
display: none;
|
|
2338
2364
|
}
|
|
2365
|
+
.pro-modal-select .ant-input-affix-wrapper,
|
|
2366
|
+
.pro-tree-modal .ant-input-affix-wrapper {
|
|
2367
|
+
border-top-right-radius: 0;
|
|
2368
|
+
border-bottom-right-radius: 0;
|
|
2369
|
+
}
|
|
2370
|
+
.pro-modal-select .ant-input-affix-wrapper.ant-input-affix-wrapper-status-error + .ant-btn,
|
|
2371
|
+
.pro-tree-modal .ant-input-affix-wrapper.ant-input-affix-wrapper-status-error + .ant-btn {
|
|
2372
|
+
border: 1px solid var(--ant-error-color);
|
|
2373
|
+
}
|
|
2374
|
+
.pro-modal-select .ant-input-affix-wrapper.ant-input-affix-wrapper-status-error + .ant-btn > .viewSvg,
|
|
2375
|
+
.pro-tree-modal .ant-input-affix-wrapper.ant-input-affix-wrapper-status-error + .ant-btn > .viewSvg {
|
|
2376
|
+
color: var(--ant-error-color);
|
|
2377
|
+
}
|
|
2339
2378
|
.pro-modal-select .pro-tree-modal-input-appoint .ant-input,
|
|
2340
2379
|
.pro-tree-modal .pro-tree-modal-input-appoint .ant-input {
|
|
2341
2380
|
border-top-left-radius: 0;
|
|
@@ -2367,6 +2406,14 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2367
2406
|
cursor: pointer;
|
|
2368
2407
|
fill: #c5c7cd;
|
|
2369
2408
|
}
|
|
2409
|
+
.pro-modal-select .ant-select-status-error + .ant-btn,
|
|
2410
|
+
.pro-tree-modal .ant-select-status-error + .ant-btn {
|
|
2411
|
+
border: 1px solid var(--ant-error-color);
|
|
2412
|
+
}
|
|
2413
|
+
.pro-modal-select .ant-select-status-error + .ant-btn > .viewSvg,
|
|
2414
|
+
.pro-tree-modal .ant-select-status-error + .ant-btn > .viewSvg {
|
|
2415
|
+
color: var(--ant-error-color);
|
|
2416
|
+
}
|
|
2370
2417
|
.pro-modal-select .ant-input-group-addon,
|
|
2371
2418
|
.pro-tree-modal .ant-input-group-addon {
|
|
2372
2419
|
padding: 0px var(--zaui-space-size-sm, 8px);
|
|
@@ -2888,6 +2935,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2888
2935
|
overflow: hidden;
|
|
2889
2936
|
white-space: nowrap;
|
|
2890
2937
|
text-overflow: ellipsis;
|
|
2938
|
+
width: 100%;
|
|
2891
2939
|
}
|
|
2892
2940
|
.pro-form .full-form-item {
|
|
2893
2941
|
width: 100%;
|
|
@@ -3583,6 +3631,28 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3583
3631
|
.pro-tree {
|
|
3584
3632
|
height: 100%;
|
|
3585
3633
|
}
|
|
3634
|
+
.pro-tree .ant-tree-node-content-wrapper {
|
|
3635
|
+
display: -webkit-box;
|
|
3636
|
+
display: -webkit-flex;
|
|
3637
|
+
display: -ms-flexbox;
|
|
3638
|
+
display: flex;
|
|
3639
|
+
-webkit-box-align: baseline;
|
|
3640
|
+
-webkit-align-items: baseline;
|
|
3641
|
+
-ms-flex-align: baseline;
|
|
3642
|
+
align-items: baseline;
|
|
3643
|
+
}
|
|
3644
|
+
.pro-tree .ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper {
|
|
3645
|
+
color: var(--zaui-text);
|
|
3646
|
+
}
|
|
3647
|
+
.pro-tree .ant-tree .ant-tree-treenode-disabled .pro-tree-tree-node.checked {
|
|
3648
|
+
color: var(--zaui-text);
|
|
3649
|
+
}
|
|
3650
|
+
.pro-tree .ant-tree .ant-tree-treenode-disabled .pro-tree-tree-node.checked .brand-bg-opa-ten {
|
|
3651
|
+
background-color: inherit;
|
|
3652
|
+
}
|
|
3653
|
+
.pro-tree .ant-select-dropdown.pro-tree-select-drop-down-container.checkable-tree {
|
|
3654
|
+
overflow: hidden!important;
|
|
3655
|
+
}
|
|
3586
3656
|
.pro-tree .ant-spin-nested-loading {
|
|
3587
3657
|
height: 100%;
|
|
3588
3658
|
}
|
|
@@ -3899,15 +3969,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3899
3969
|
background-color: var(--zaui-brand);
|
|
3900
3970
|
opacity: 0.08;
|
|
3901
3971
|
}
|
|
3902
|
-
.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper {
|
|
3903
|
-
color: var(--zaui-text);
|
|
3904
|
-
}
|
|
3905
|
-
.ant-tree .ant-tree-treenode-disabled .pro-tree-tree-node.checked {
|
|
3906
|
-
color: var(--zaui-text);
|
|
3907
|
-
}
|
|
3908
|
-
.ant-tree .ant-tree-treenode-disabled .pro-tree-tree-node.checked .brand-bg-opa-ten {
|
|
3909
|
-
background-color: inherit;
|
|
3910
|
-
}
|
|
3911
3972
|
.pro-form.pro-form-view .ant-form-item .pro-tree * {
|
|
3912
3973
|
line-height: 1 !important;
|
|
3913
3974
|
height: auto !important;
|
|
@@ -3922,9 +3983,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3922
3983
|
.pro-form.pro-form-view .ant-form-item .pro-tree .ant-tree-checkbox * {
|
|
3923
3984
|
height: 16px !important;
|
|
3924
3985
|
}
|
|
3925
|
-
.ant-select-dropdown.pro-tree-select-drop-down-container.checkable-tree {
|
|
3926
|
-
overflow: hidden!important;
|
|
3927
|
-
}
|
|
3928
3986
|
.pro-drawer .pro-drawer-close {
|
|
3929
3987
|
position: absolute;
|
|
3930
3988
|
top: 6px;
|
|
@@ -4163,10 +4221,6 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4163
4221
|
.pro-edit-table .ant-space .ant-btn-link:first-child {
|
|
4164
4222
|
padding-left: 0;
|
|
4165
4223
|
}
|
|
4166
|
-
.pro-edit-table .ant-table-header > table .ant-table-thead > tr > th.ant-table-selection-column {
|
|
4167
|
-
padding-left: var(--zaui-space-size-md, 16px);
|
|
4168
|
-
padding-right: var(--zaui-space-size-md, 16px);
|
|
4169
|
-
}
|
|
4170
4224
|
.pro-edit-table .ant-table-header > table .ant-table-thead > tr > th:not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]).is-required.is-required-right .pro-edit-table-title::before {
|
|
4171
4225
|
position: static;
|
|
4172
4226
|
top: 0;
|
|
@@ -11,25 +11,26 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
|
11
11
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
12
12
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
13
13
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
14
|
-
var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules", "equalWith", "className"];
|
|
14
|
+
var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules", "equalWith", "className", "trim"];
|
|
15
15
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
/* eslint-disable prefer-destructuring */
|
|
17
17
|
/* eslint-disable prefer-const */
|
|
18
18
|
import React, { useCallback, useEffect } from 'react';
|
|
19
19
|
import classNames from 'classnames';
|
|
20
|
-
import { cloneDeep, isEqual, debounce, omit, isFunction
|
|
20
|
+
import { cloneDeep, isEqual, debounce, omit, isFunction } from 'lodash';
|
|
21
21
|
import valueTypeMap from '../../../ProForm/utils/valueType';
|
|
22
22
|
import transformMap from '../../utils/transform';
|
|
23
|
-
import { getNamePath, difference } from '../../utils/tools';
|
|
23
|
+
import { getNamePath, difference, getDisabled } from '../../utils/tools';
|
|
24
24
|
import * as componentMap from '../../../ProForm/components';
|
|
25
|
+
import { useProConfig } from '../../../ProConfigProvider';
|
|
25
26
|
import Container from '../../../ProForm/components/Container';
|
|
26
27
|
import transformNames from '../../../ProForm/utils/transformNames';
|
|
27
28
|
import { FieldProvider } from '../../../ProForm/utils/useFieldProps';
|
|
28
29
|
import { useListChanged } from '../../../ProForm/utils/useListChanged';
|
|
29
30
|
import useRules from '../../../ProForm/utils/useRules';
|
|
30
|
-
import { isSelect } from '../../../ProForm/utils';
|
|
31
|
+
import { isSelect, isTrim } from '../../../ProForm/utils';
|
|
31
32
|
var RenderField = function RenderField(_ref) {
|
|
32
|
-
var _type, _type$replace, _fieldProps2,
|
|
33
|
+
var _type, _type$replace, _fieldProps2, _names, _TargetComponent4, _componentProps;
|
|
33
34
|
var value = _ref.text,
|
|
34
35
|
record = _ref.record,
|
|
35
36
|
index = _ref.index,
|
|
@@ -56,6 +57,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
56
57
|
rules = _column$rules === void 0 ? [] : _column$rules,
|
|
57
58
|
equalWith = column.equalWith,
|
|
58
59
|
className = column.className,
|
|
60
|
+
trim = column.trim,
|
|
59
61
|
resetProps = _objectWithoutProperties(column, _excluded);
|
|
60
62
|
// editRender弃用使用component同ProForm
|
|
61
63
|
var _editRender = component || editRender;
|
|
@@ -75,7 +77,8 @@ var RenderField = function RenderField(_ref) {
|
|
|
75
77
|
formNamePath = config.namePath,
|
|
76
78
|
_config$originalDiffT = config.originalDiffTip,
|
|
77
79
|
originalDiffTip = _config$originalDiffT === void 0 ? true : _config$originalDiffT,
|
|
78
|
-
rowDisabled = config.rowDisabled
|
|
80
|
+
rowDisabled = config.rowDisabled,
|
|
81
|
+
otherProps = config.otherProps;
|
|
79
82
|
var _fieldProps = fieldProps || formItemProps || {};
|
|
80
83
|
var _rules = rules || [];
|
|
81
84
|
var _required = required;
|
|
@@ -96,35 +99,41 @@ var RenderField = function RenderField(_ref) {
|
|
|
96
99
|
form: form,
|
|
97
100
|
namePath: [].concat(_toConsumableArray(namePath), [index])
|
|
98
101
|
};
|
|
102
|
+
// 行参数
|
|
103
|
+
var rowParams = [currentValue, rowData, options];
|
|
99
104
|
if (typeof isEditable === 'function') {
|
|
100
|
-
isEditable = isEditable(
|
|
105
|
+
isEditable = isEditable.apply(void 0, rowParams);
|
|
101
106
|
}
|
|
107
|
+
// 获取最终的disabled
|
|
108
|
+
_disabled = getDisabled({
|
|
109
|
+
globalControl: otherProps === null || otherProps === void 0 ? void 0 : otherProps.globalControl,
|
|
110
|
+
formDisabled: otherProps === null || otherProps === void 0 ? void 0 : otherProps.formDisabled,
|
|
111
|
+
column: column,
|
|
112
|
+
tabledDisabled: config === null || config === void 0 ? void 0 : config.disabled,
|
|
113
|
+
columnFieldProps: _fieldProps,
|
|
114
|
+
params: rowParams
|
|
115
|
+
});
|
|
102
116
|
// 是否只读文本
|
|
103
|
-
var isView = !isEditable || (record === null || record === void 0 ? void 0 : record['is-view']) || config.isView || virtualKey && !isEditing || (
|
|
117
|
+
var isView = !isEditable || (record === null || record === void 0 ? void 0 : record['is-view']) || config.isView || virtualKey && !isEditing || getDisabled({
|
|
118
|
+
globalControl: otherProps === null || otherProps === void 0 ? void 0 : otherProps.globalControl,
|
|
119
|
+
formDisabled: otherProps === null || otherProps === void 0 ? void 0 : otherProps.formDisabled,
|
|
120
|
+
column: column,
|
|
121
|
+
tabledDisabled: config === null || config === void 0 ? void 0 : config.disabled,
|
|
122
|
+
columnFieldProps: _fieldProps,
|
|
123
|
+
params: rowParams,
|
|
124
|
+
rowDisabled: rowDisabled || 'empty'
|
|
125
|
+
});
|
|
104
126
|
// 只读文本时,采用当前formItem的name,单行编辑时,使用生成的虚拟的name
|
|
105
127
|
var baseName = isView ? name : namePath;
|
|
106
128
|
var TargetComponent;
|
|
107
|
-
if (
|
|
108
|
-
_required = required(
|
|
109
|
-
}
|
|
110
|
-
if (typeof fieldProps === 'function') {
|
|
111
|
-
_fieldProps = fieldProps(currentValue, rowData, options);
|
|
112
|
-
}
|
|
113
|
-
if (typeof ((_fieldProps2 = _fieldProps) === null || _fieldProps2 === void 0 ? void 0 : _fieldProps2.disabled) === 'function') {
|
|
114
|
-
_disabled = _fieldProps.disabled(currentValue, rowData, options);
|
|
115
|
-
} else if (isBoolean((_fieldProps3 = _fieldProps) === null || _fieldProps3 === void 0 ? void 0 : _fieldProps3.disabled)) {
|
|
116
|
-
_disabled = _fieldProps.disabled;
|
|
117
|
-
}
|
|
118
|
-
if ((config === null || config === void 0 ? void 0 : config.disabled) === true) {
|
|
119
|
-
_disabled = column.disabled || (config === null || config === void 0 ? void 0 : config.disabled);
|
|
129
|
+
if (isFunction(required)) {
|
|
130
|
+
_required = required.apply(void 0, rowParams);
|
|
120
131
|
}
|
|
121
|
-
if (
|
|
122
|
-
|
|
123
|
-
} else if (isBoolean(column.disabled)) {
|
|
124
|
-
_disabled = column.disabled;
|
|
132
|
+
if (isFunction(fieldProps)) {
|
|
133
|
+
_fieldProps = fieldProps.apply(void 0, rowParams);
|
|
125
134
|
}
|
|
126
|
-
if (
|
|
127
|
-
_rules = rules(
|
|
135
|
+
if (isFunction(rules)) {
|
|
136
|
+
_rules = rules.apply(void 0, rowParams);
|
|
128
137
|
}
|
|
129
138
|
// 设置校验规则
|
|
130
139
|
var internalRule = useRules({
|
|
@@ -134,7 +143,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
134
143
|
required: !isView && _required,
|
|
135
144
|
rules: isEditing ? _rules : [],
|
|
136
145
|
isSelect: isSelect({
|
|
137
|
-
dataSource: (
|
|
146
|
+
dataSource: (_fieldProps2 = _fieldProps) === null || _fieldProps2 === void 0 ? void 0 : _fieldProps2.dataSource,
|
|
138
147
|
type: type
|
|
139
148
|
}),
|
|
140
149
|
type: type
|
|
@@ -169,7 +178,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
169
178
|
* @returns {}
|
|
170
179
|
*/
|
|
171
180
|
var valueTypeTransform = useCallback(function () {
|
|
172
|
-
var
|
|
181
|
+
var _fieldProps3;
|
|
173
182
|
// 不存在valueType返回空
|
|
174
183
|
if (!valueType) {
|
|
175
184
|
return {};
|
|
@@ -179,7 +188,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
179
188
|
valueType = 'switch';
|
|
180
189
|
}
|
|
181
190
|
var params = _objectSpread(_objectSpread({}, column), {}, {
|
|
182
|
-
mode: (
|
|
191
|
+
mode: (_fieldProps3 = _fieldProps) === null || _fieldProps3 === void 0 ? void 0 : _fieldProps3.mode
|
|
183
192
|
});
|
|
184
193
|
return isFunction(valueTypeMap[valueType]) ? valueTypeMap[valueType](params) : {};
|
|
185
194
|
}, [valueType]);
|
|
@@ -224,7 +233,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
224
233
|
}
|
|
225
234
|
if (isEditable && isEditing) {
|
|
226
235
|
if (typeof _editRender === 'function') {
|
|
227
|
-
TargetComponent = _editRender(
|
|
236
|
+
TargetComponent = _editRender.apply(void 0, rowParams);
|
|
228
237
|
}
|
|
229
238
|
if ( /*#__PURE__*/React.isValidElement(_editRender)) {
|
|
230
239
|
TargetComponent = _editRender;
|
|
@@ -377,13 +386,13 @@ var RenderField = function RenderField(_ref) {
|
|
|
377
386
|
var _onblur = /*#__PURE__*/function () {
|
|
378
387
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
379
388
|
var _TargetComponent3, _TargetComponent3$pro, _TargetComponent$prop4;
|
|
380
|
-
var
|
|
381
|
-
row,
|
|
382
|
-
orgRow,
|
|
383
|
-
_len3,
|
|
389
|
+
var _len3,
|
|
384
390
|
args,
|
|
385
391
|
_key3,
|
|
386
392
|
_args,
|
|
393
|
+
rowPath,
|
|
394
|
+
row,
|
|
395
|
+
orgRow,
|
|
387
396
|
_Object$keys2,
|
|
388
397
|
_Object$keys2$map,
|
|
389
398
|
diff,
|
|
@@ -392,13 +401,13 @@ var RenderField = function RenderField(_ref) {
|
|
|
392
401
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
393
402
|
while (1) switch (_context2.prev = _context2.next) {
|
|
394
403
|
case 0:
|
|
395
|
-
rowPath = [].concat(_toConsumableArray(namePath), [index]);
|
|
396
|
-
row = form.getFieldValue(rowPath);
|
|
397
|
-
orgRow = cloneDeep(row);
|
|
398
404
|
for (_len3 = _args3.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
399
405
|
args[_key3] = _args3[_key3];
|
|
400
406
|
}
|
|
401
|
-
_args = formatArgs(args);
|
|
407
|
+
_args = formatArgs([].concat(args));
|
|
408
|
+
rowPath = [].concat(_toConsumableArray(namePath), [index]);
|
|
409
|
+
row = type === 'Group' ? _args[1] : form.getFieldValue(rowPath, true);
|
|
410
|
+
orgRow = cloneDeep(row);
|
|
402
411
|
_args[1] = row;
|
|
403
412
|
_context2.t0 = (_TargetComponent3 = TargetComponent) === null || _TargetComponent3 === void 0 ? void 0 : (_TargetComponent3$pro = _TargetComponent3.props) === null || _TargetComponent3$pro === void 0 ? void 0 : _TargetComponent3$pro.onBlur;
|
|
404
413
|
if (!_context2.t0) {
|
|
@@ -438,14 +447,12 @@ var RenderField = function RenderField(_ref) {
|
|
|
438
447
|
cellNamePath: []
|
|
439
448
|
});
|
|
440
449
|
case 20:
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
});
|
|
448
|
-
}
|
|
450
|
+
// 单行编辑时需要 强制更新视图
|
|
451
|
+
setState({
|
|
452
|
+
forceUpdate: {
|
|
453
|
+
d: Date.now()
|
|
454
|
+
}
|
|
455
|
+
});
|
|
449
456
|
case 21:
|
|
450
457
|
case "end":
|
|
451
458
|
return _context2.stop();
|
|
@@ -512,7 +519,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
512
519
|
if (['Select', 'ProSelect', 'ProEnum'].includes(type)) {
|
|
513
520
|
componentProps.scrollFollowParent = false;
|
|
514
521
|
}
|
|
515
|
-
Object.assign(_formItemProps, _objectSpread(_objectSpread(_objectSpread({}, defaultTransform()), valueTypeTransform()), namesTransform()));
|
|
522
|
+
Object.assign(_formItemProps, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, defaultTransform()), valueTypeTransform()), namesTransform()), isTrim(type, trim, useProConfig())));
|
|
516
523
|
// 编辑&保存模式,在查看状态下移除表单的rules不做校验
|
|
517
524
|
if (!isEditing) {
|
|
518
525
|
delete _formItemProps.rules;
|
package/es/ProEditTable/index.js
CHANGED
|
@@ -129,7 +129,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
129
129
|
return getRowKey(item) === getRowKey(record);
|
|
130
130
|
}));
|
|
131
131
|
};
|
|
132
|
-
var config = {
|
|
132
|
+
var config = _objectSpread({
|
|
133
133
|
form: form,
|
|
134
134
|
mode: mode,
|
|
135
135
|
isView: isView,
|
|
@@ -162,7 +162,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
162
162
|
originalDiffTip: originalDiffTip,
|
|
163
163
|
prefixCls: prefixCls,
|
|
164
164
|
rowDisabled: rowDisabled
|
|
165
|
-
};
|
|
165
|
+
}, resetProps);
|
|
166
166
|
// 编辑行设置下样式
|
|
167
167
|
var _rowClassName = function _rowClassName(record) {
|
|
168
168
|
var isEdit = !virtualKey || editingKeys.includes(record.rowKey);
|
|
@@ -87,11 +87,6 @@
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
.@{ant-prefix}-table-header>table .@{ant-prefix}-table-thead>tr>th.@{ant-prefix}-table-selection-column {
|
|
91
|
-
padding-left: var(--zaui-space-size-md, 16px);
|
|
92
|
-
padding-right: var(--zaui-space-size-md, 16px);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
90
|
.@{ant-prefix}-table-header>table .@{ant-prefix}-table-thead>tr>th:not(.@{ant-prefix}-table-selection-column):not(.@{ant-prefix}-table-row-expand-icon-cell):not([colspan]).is-required {
|
|
96
91
|
&.is-required-right {
|
|
97
92
|
.pro-edit-table-title {
|
|
@@ -14,3 +14,15 @@ export declare const onDelete: ({ name, form, virtualKey, selectedRowKeys }: {
|
|
|
14
14
|
virtualKey: any;
|
|
15
15
|
selectedRowKeys: any;
|
|
16
16
|
}) => void;
|
|
17
|
+
/** 获取最终的disabled, 两张模式【子级优先,全局优先】
|
|
18
|
+
* 全局优先:globalControl为true时,全局控制
|
|
19
|
+
* 子级优先:globalControl为false时,子级控制
|
|
20
|
+
* @param globalControl 全局控制
|
|
21
|
+
* @param formDisabled 表单的disabled
|
|
22
|
+
* @param column 当前列
|
|
23
|
+
* @param tabledDisabled 表格的disabled
|
|
24
|
+
* @param columnFieldProps 当前列的fieldProps
|
|
25
|
+
* @param params 当前列的参数
|
|
26
|
+
* @param rowDisabled 行禁用参数
|
|
27
|
+
*/
|
|
28
|
+
export declare const getDisabled: ({ globalControl, formDisabled, column, tabledDisabled, columnFieldProps, params, rowDisabled }: any) => any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import { cloneDeep, isString, isObject, isEqual, transform, isFunction, isBoolean } from 'lodash';
|
|
2
3
|
export var getRandom = function getRandom() {
|
|
3
4
|
return Math.random().toString(36).slice(-6);
|
|
4
5
|
};
|
|
@@ -6,7 +7,8 @@ export var getRandom = function getRandom() {
|
|
|
6
7
|
export var difference = function difference(object, base) {
|
|
7
8
|
var changes = function changes(object, base) {
|
|
8
9
|
return transform(object, function (result, value, key) {
|
|
9
|
-
|
|
10
|
+
var _key$indexOf;
|
|
11
|
+
if ((key === null || key === void 0 ? void 0 : (_key$indexOf = key.indexOf) === null || _key$indexOf === void 0 ? void 0 : _key$indexOf.call(key, '-')) > -1) {
|
|
10
12
|
result[key] = true;
|
|
11
13
|
} else if (!isEqual(value, base[key])) {
|
|
12
14
|
result[key] = isObject(value) && isObject(base[key]) ? changes(value, base[key]) : value;
|
|
@@ -74,4 +76,79 @@ export var onDelete = function onDelete(_ref) {
|
|
|
74
76
|
form.setFieldValue(namePath, virtualList);
|
|
75
77
|
}
|
|
76
78
|
}
|
|
79
|
+
};
|
|
80
|
+
/** 获取最终的disabled, 两张模式【子级优先,全局优先】
|
|
81
|
+
* 全局优先:globalControl为true时,全局控制
|
|
82
|
+
* 子级优先:globalControl为false时,子级控制
|
|
83
|
+
* @param globalControl 全局控制
|
|
84
|
+
* @param formDisabled 表单的disabled
|
|
85
|
+
* @param column 当前列
|
|
86
|
+
* @param tabledDisabled 表格的disabled
|
|
87
|
+
* @param columnFieldProps 当前列的fieldProps
|
|
88
|
+
* @param params 当前列的参数
|
|
89
|
+
* @param rowDisabled 行禁用参数
|
|
90
|
+
*/
|
|
91
|
+
export var getDisabled = function getDisabled(_ref2) {
|
|
92
|
+
var globalControl = _ref2.globalControl,
|
|
93
|
+
formDisabled = _ref2.formDisabled,
|
|
94
|
+
column = _ref2.column,
|
|
95
|
+
tabledDisabled = _ref2.tabledDisabled,
|
|
96
|
+
columnFieldProps = _ref2.columnFieldProps,
|
|
97
|
+
params = _ref2.params,
|
|
98
|
+
rowDisabled = _ref2.rowDisabled;
|
|
99
|
+
var convertToBoolean = function convertToBoolean(value) {
|
|
100
|
+
if (Array.isArray(value)) {
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
if (value === null || value === undefined || value === '') {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
if (value === 0) {
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
return Boolean(value);
|
|
110
|
+
};
|
|
111
|
+
// 判断是否有column的disabled属性
|
|
112
|
+
var noColumnDisabled = function noColumnDisabled() {
|
|
113
|
+
if (isFunction(column === null || column === void 0 ? void 0 : column.disabled) || isFunction(columnFieldProps === null || columnFieldProps === void 0 ? void 0 : columnFieldProps.disabled) || isBoolean(column === null || column === void 0 ? void 0 : column.disabled) || isBoolean(columnFieldProps === null || columnFieldProps === void 0 ? void 0 : columnFieldProps.disabled)) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
// 判断FieldProps是否有disabled属性
|
|
117
|
+
if (isFunction(columnFieldProps)) {
|
|
118
|
+
var _columnFieldProps = columnFieldProps.apply(void 0, _toConsumableArray(params)),
|
|
119
|
+
disabled = _columnFieldProps.disabled;
|
|
120
|
+
if (isFunction(disabled) || isBoolean(disabled)) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
};
|
|
126
|
+
if (globalControl) {
|
|
127
|
+
return convertToBoolean(formDisabled) || convertToBoolean(tabledDisabled);
|
|
128
|
+
}
|
|
129
|
+
if (rowDisabled === 'empty') {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
// 当表单含有diabled属性时,优先使用表单的disabled
|
|
133
|
+
if (isFunction(rowDisabled) && noColumnDisabled()) {
|
|
134
|
+
return rowDisabled(params[1]);
|
|
135
|
+
}
|
|
136
|
+
if (isFunction(column === null || column === void 0 ? void 0 : column.disabled)) {
|
|
137
|
+
return convertToBoolean(column === null || column === void 0 ? void 0 : column.disabled.apply(column, _toConsumableArray(params)));
|
|
138
|
+
}
|
|
139
|
+
// 表单FieldProps为函数时
|
|
140
|
+
if (isFunction(columnFieldProps)) {
|
|
141
|
+
var _columnFieldProps2 = columnFieldProps.apply(void 0, _toConsumableArray(params)),
|
|
142
|
+
disabled = _columnFieldProps2.disabled;
|
|
143
|
+
if (isFunction(disabled)) {
|
|
144
|
+
return convertToBoolean(disabled.apply(void 0, _toConsumableArray(params)));
|
|
145
|
+
}
|
|
146
|
+
if (isBoolean(disabled)) {
|
|
147
|
+
return convertToBoolean(disabled);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (isFunction(columnFieldProps === null || columnFieldProps === void 0 ? void 0 : columnFieldProps.disabled)) {
|
|
151
|
+
return convertToBoolean(columnFieldProps === null || columnFieldProps === void 0 ? void 0 : columnFieldProps.disabled.apply(columnFieldProps, _toConsumableArray(params)));
|
|
152
|
+
}
|
|
153
|
+
return convertToBoolean(column === null || column === void 0 ? void 0 : column.disabled) || convertToBoolean(columnFieldProps === null || columnFieldProps === void 0 ? void 0 : columnFieldProps.disabled) || convertToBoolean(tabledDisabled);
|
|
77
154
|
};
|
|
@@ -25,9 +25,16 @@ var RangePicker = function RangePicker(props) {
|
|
|
25
25
|
viewEmpty = _ref.viewEmpty,
|
|
26
26
|
valueType = _ref.valueType;
|
|
27
27
|
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon;
|
|
28
|
+
var _res = _objectSpread(_objectSpread({}, rest), {}, {
|
|
29
|
+
showTime: !rest.showTime && valueType === 'dateTime' || rest.showTime
|
|
30
|
+
});
|
|
31
|
+
// 字符串时间格式兼容
|
|
32
|
+
if (Array.isArray(_res.value) && isString(_res.value[0]) && isString(_res.value[1])) {
|
|
33
|
+
_res.value = [moment(_res.value[0]), moment(_res.value[1])];
|
|
34
|
+
}
|
|
28
35
|
if (isView) {
|
|
29
|
-
var
|
|
30
|
-
value =
|
|
36
|
+
var _res$value = _res.value,
|
|
37
|
+
value = _res$value === void 0 ? [] : _res$value;
|
|
31
38
|
var viewChildren = null;
|
|
32
39
|
if (!value || !value[0] || !value[1]) {
|
|
33
40
|
viewChildren = null;
|
|
@@ -49,13 +56,6 @@ var RangePicker = function RangePicker(props) {
|
|
|
49
56
|
children: viewChildren
|
|
50
57
|
});
|
|
51
58
|
}
|
|
52
|
-
var _res = _objectSpread(_objectSpread({}, rest), {}, {
|
|
53
|
-
showTime: !rest.showTime && valueType === 'dateTime' || rest.showTime
|
|
54
|
-
});
|
|
55
|
-
// 字符串时间格式兼容
|
|
56
|
-
if (Array.isArray(_res.value) && isString(_res.value[0]) && isString(_res.value[1])) {
|
|
57
|
-
_res.value = [moment(_res.value[0]), moment(_res.value[1])];
|
|
58
|
-
}
|
|
59
59
|
return _jsx(AntRangePicker, _objectSpread(_objectSpread({}, initialConfig), omit(_res, ['separator'])));
|
|
60
60
|
};
|
|
61
61
|
export default RangePicker;
|