@zat-design/sisyphus-react 3.8.3 → 3.9.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/extensions.json +5 -0
- package/dist/index.esm.css +48 -3
- package/dist/less.esm.css +47 -2
- package/es/ProDrawerForm/components/ProDrawer/index.js +3 -1
- package/es/ProDrawerForm/components/ProModal/index.js +5 -3
- package/es/ProDrawerForm/propsType.d.ts +1 -0
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +83 -20
- package/es/ProEditTable/components/RenderField/index.js +6 -2
- package/es/ProEditTable/index.js +18 -9
- package/es/ProEditTable/propsType.d.ts +3 -6
- package/es/ProEditTable/style/index.less +0 -1
- package/es/ProEditTable/utils/index.js +10 -3
- package/es/ProEnum/index.js +1 -1
- package/es/ProForm/components/base/InputNumber/index.js +1 -1
- package/es/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +4 -2
- package/es/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -0
- package/es/ProForm/components/combination/FormList/components/LineFields.js +4 -2
- package/es/ProForm/components/combination/FormList/index.js +14 -3
- package/es/ProForm/components/combination/Group/index.js +5 -5
- package/es/ProForm/components/combination/ProCascader/index.js +21 -14
- package/es/ProForm/components/combination/ProModalSelect/index.js +19 -4
- package/es/ProForm/components/render/ChangedWrapper.js +30 -11
- package/es/ProForm/components/render/Render.js +3 -1
- package/es/ProForm/components/render/RenderFields.js +4 -2
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/style/index.less +35 -9
- package/es/ProForm/utils/diffOriginal.js +14 -2
- package/es/ProForm/utils/useShouldUpdate.js +1 -9
- package/es/ProTable/components/FormatColumn/index.d.ts +3 -2
- package/es/ProTable/components/FormatColumn/index.js +143 -62
- package/es/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/es/ProTable/components/RenderColumn/index.js +50 -19
- package/es/ProTable/index.d.ts +6 -5
- package/es/ProTable/index.js +12 -12
- package/es/ProTable/propsType.d.ts +6 -0
- package/es/ProTable/style/index.less +24 -1
- package/es/ProTable/utils/index.js +2 -2
- package/es/ProTree/components/ProTreeSelect/index.js +32 -13
- package/es/style/theme/antd.less +1 -1
- package/es/utils/index.d.ts +2 -1
- package/es/utils/index.js +30 -1
- package/lib/ProDrawerForm/components/ProDrawer/index.js +3 -1
- package/lib/ProDrawerForm/components/ProModal/index.js +5 -3
- package/lib/ProDrawerForm/propsType.d.ts +1 -0
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +82 -21
- package/lib/ProEditTable/components/RenderField/index.js +6 -2
- package/lib/ProEditTable/index.js +18 -9
- package/lib/ProEditTable/propsType.d.ts +3 -6
- package/lib/ProEditTable/style/index.less +0 -1
- package/lib/ProEditTable/utils/index.js +10 -3
- package/lib/ProEnum/index.js +1 -1
- package/lib/ProForm/components/base/InputNumber/index.js +1 -1
- package/lib/ProForm/components/combination/FormList/components/BlockFields.d.ts +2 -0
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +4 -2
- package/lib/ProForm/components/combination/FormList/components/LineFields.d.ts +2 -0
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +4 -2
- package/lib/ProForm/components/combination/FormList/index.js +14 -3
- package/lib/ProForm/components/combination/Group/index.js +5 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +21 -14
- package/lib/ProForm/components/combination/ProModalSelect/index.js +19 -4
- package/lib/ProForm/components/render/ChangedWrapper.js +30 -11
- package/lib/ProForm/components/render/Render.js +3 -1
- package/lib/ProForm/components/render/RenderFields.js +4 -2
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/style/index.less +35 -9
- package/lib/ProForm/utils/diffOriginal.js +13 -1
- package/lib/ProForm/utils/useShouldUpdate.js +1 -9
- package/lib/ProTable/components/FormatColumn/index.d.ts +3 -2
- package/lib/ProTable/components/FormatColumn/index.js +143 -62
- package/lib/ProTable/components/RenderColumn/index.d.ts +2 -0
- package/lib/ProTable/components/RenderColumn/index.js +47 -18
- package/lib/ProTable/index.d.ts +6 -5
- package/lib/ProTable/index.js +12 -12
- package/lib/ProTable/propsType.d.ts +6 -0
- package/lib/ProTable/style/index.less +24 -1
- package/lib/ProTable/utils/index.js +2 -2
- package/lib/ProTree/components/ProTreeSelect/index.js +31 -12
- package/lib/style/theme/antd.less +1 -1
- package/lib/utils/index.d.ts +2 -1
- package/lib/utils/index.js +32 -2
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
|
@@ -1908,12 +1908,32 @@
|
|
|
1908
1908
|
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1909
1909
|
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
|
1910
1910
|
}
|
|
1911
|
+
.pro-table tbody.ant-table-tbody tr.ant-table-row.new-cell td.ant-table-cell.ant-table-cell-fix-right {
|
|
1912
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1913
|
+
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1914
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
|
1915
|
+
}
|
|
1916
|
+
.pro-table tbody.ant-table-tbody tr.ant-table-row.new-cell td.ant-table-cell.ant-table-cell-fix-left {
|
|
1917
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1918
|
+
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1919
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
|
1920
|
+
}
|
|
1911
1921
|
.pro-table tbody.ant-table-tbody .ant-table-cell .varied-cell {
|
|
1912
1922
|
margin-left: -8px;
|
|
1913
1923
|
padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
|
|
1914
1924
|
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
1915
1925
|
border-radius: var(--zaui-border-radius, 8px);
|
|
1916
1926
|
}
|
|
1927
|
+
.pro-table tbody.ant-table-tbody .ant-table-cell .varied-cell .pro-form-view-container {
|
|
1928
|
+
overflow: hidden;
|
|
1929
|
+
white-space: nowrap;
|
|
1930
|
+
text-overflow: ellipsis;
|
|
1931
|
+
}
|
|
1932
|
+
.pro-table tbody.ant-table-tbody .ant-table-cell .ant-typography-ellipsis .pro-form-view-container {
|
|
1933
|
+
overflow: hidden;
|
|
1934
|
+
white-space: nowrap;
|
|
1935
|
+
text-overflow: ellipsis;
|
|
1936
|
+
}
|
|
1917
1937
|
.pro-table tbody.ant-table-tbody .varied-cell.empty-cell {
|
|
1918
1938
|
width: 24.5px;
|
|
1919
1939
|
}
|
|
@@ -2823,6 +2843,12 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2823
2843
|
display: unset;
|
|
2824
2844
|
visibility: hidden;
|
|
2825
2845
|
}
|
|
2846
|
+
.pro-form.pro-form-view .pro-group .ant-space-item,
|
|
2847
|
+
.pro-form.pro-form-view .pro-group .pro-form-view-container {
|
|
2848
|
+
width: -webkit-max-content;
|
|
2849
|
+
width: -moz-max-content;
|
|
2850
|
+
width: max-content;
|
|
2851
|
+
}
|
|
2826
2852
|
.pro-form.pro-form-view .ant-form-item-label label {
|
|
2827
2853
|
color: var(--zaui-aide-text, #939599);
|
|
2828
2854
|
}
|
|
@@ -3029,6 +3055,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3029
3055
|
border-radius: 4px;
|
|
3030
3056
|
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3031
3057
|
}
|
|
3058
|
+
.pro-form .pro-form-item-changed .ant-input {
|
|
3059
|
+
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3060
|
+
}
|
|
3032
3061
|
.pro-form .pro-form-item-changed .ant-select.ant-select-disabled .ant-select-selector {
|
|
3033
3062
|
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3034
3063
|
}
|
|
@@ -3086,6 +3115,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3086
3115
|
border-radius: 4px;
|
|
3087
3116
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3088
3117
|
}
|
|
3118
|
+
.pro-form .pro-form-item-add .ant-input {
|
|
3119
|
+
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3120
|
+
}
|
|
3089
3121
|
.pro-form .pro-form-item-add .ant-select.ant-select-disabled .ant-select-selector {
|
|
3090
3122
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3091
3123
|
}
|
|
@@ -3139,10 +3171,23 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3139
3171
|
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3140
3172
|
border-radius: 4px;
|
|
3141
3173
|
}
|
|
3142
|
-
.
|
|
3174
|
+
.original-value-tootip {
|
|
3175
|
+
max-width: 100%;
|
|
3176
|
+
width: -webkit-max-content;
|
|
3177
|
+
width: -moz-max-content;
|
|
3178
|
+
width: max-content;
|
|
3179
|
+
position: fixed;
|
|
3180
|
+
}
|
|
3181
|
+
.original-value-tootip .changed-tooltip .original-value-container .ant-space-item:nth-child(1) {
|
|
3143
3182
|
white-space: nowrap;
|
|
3144
3183
|
}
|
|
3145
|
-
.changed-tooltip .
|
|
3184
|
+
.original-value-tootip .changed-tooltip .original-value-container .pro-group .ant-space-compact {
|
|
3185
|
+
display: block;
|
|
3186
|
+
}
|
|
3187
|
+
.original-value-tootip .changed-tooltip .original-value-container .pro-group .pro-form-view-container {
|
|
3188
|
+
word-break: keep-all;
|
|
3189
|
+
}
|
|
3190
|
+
.original-value-tootip .changed-tooltip .current-value-container .ant-space-item:nth-child(1) {
|
|
3146
3191
|
white-space: nowrap;
|
|
3147
3192
|
}
|
|
3148
3193
|
.pro-upload .pro-upload-dragger .pro-upload-handle-box {
|
|
@@ -5615,7 +5660,7 @@ input[type='button'] {
|
|
|
5615
5660
|
user-select: text;
|
|
5616
5661
|
}
|
|
5617
5662
|
.ant-table.ant-table-fixed-header .ant-table-tbody .ant-table-row:nth-child(even) td {
|
|
5618
|
-
background: #ffffff
|
|
5663
|
+
background: #ffffff;
|
|
5619
5664
|
}
|
|
5620
5665
|
.ant-table.ant-table-fixed-header .ant-table-tbody .ant-table-row:nth-child(odd) {
|
|
5621
5666
|
background-color: var(--zaui-table-strip-bg, #fafafa);
|
package/dist/less.esm.css
CHANGED
|
@@ -1908,12 +1908,32 @@
|
|
|
1908
1908
|
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1909
1909
|
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
|
1910
1910
|
}
|
|
1911
|
+
.pro-table tbody.ant-table-tbody tr.ant-table-row.new-cell td.ant-table-cell.ant-table-cell-fix-right {
|
|
1912
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1913
|
+
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1914
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
|
1915
|
+
}
|
|
1916
|
+
.pro-table tbody.ant-table-tbody tr.ant-table-row.new-cell td.ant-table-cell.ant-table-cell-fix-left {
|
|
1917
|
+
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1918
|
+
background-color: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
1919
|
+
border-bottom: 1px solid var(--zaui-form-control-line, #dcdcdc);
|
|
1920
|
+
}
|
|
1911
1921
|
.pro-table tbody.ant-table-tbody .ant-table-cell .varied-cell {
|
|
1912
1922
|
margin-left: -8px;
|
|
1913
1923
|
padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
|
|
1914
1924
|
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
1915
1925
|
border-radius: var(--zaui-border-radius, 8px);
|
|
1916
1926
|
}
|
|
1927
|
+
.pro-table tbody.ant-table-tbody .ant-table-cell .varied-cell .pro-form-view-container {
|
|
1928
|
+
overflow: hidden;
|
|
1929
|
+
white-space: nowrap;
|
|
1930
|
+
text-overflow: ellipsis;
|
|
1931
|
+
}
|
|
1932
|
+
.pro-table tbody.ant-table-tbody .ant-table-cell .ant-typography-ellipsis .pro-form-view-container {
|
|
1933
|
+
overflow: hidden;
|
|
1934
|
+
white-space: nowrap;
|
|
1935
|
+
text-overflow: ellipsis;
|
|
1936
|
+
}
|
|
1917
1937
|
.pro-table tbody.ant-table-tbody .varied-cell.empty-cell {
|
|
1918
1938
|
width: 24.5px;
|
|
1919
1939
|
}
|
|
@@ -2823,6 +2843,12 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
2823
2843
|
display: unset;
|
|
2824
2844
|
visibility: hidden;
|
|
2825
2845
|
}
|
|
2846
|
+
.pro-form.pro-form-view .pro-group .ant-space-item,
|
|
2847
|
+
.pro-form.pro-form-view .pro-group .pro-form-view-container {
|
|
2848
|
+
width: -webkit-max-content;
|
|
2849
|
+
width: -moz-max-content;
|
|
2850
|
+
width: max-content;
|
|
2851
|
+
}
|
|
2826
2852
|
.pro-form.pro-form-view .ant-form-item-label label {
|
|
2827
2853
|
color: var(--zaui-aide-text, #939599);
|
|
2828
2854
|
}
|
|
@@ -3029,6 +3055,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3029
3055
|
border-radius: 4px;
|
|
3030
3056
|
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3031
3057
|
}
|
|
3058
|
+
.pro-form .pro-form-item-changed .ant-input {
|
|
3059
|
+
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3060
|
+
}
|
|
3032
3061
|
.pro-form .pro-form-item-changed .ant-select.ant-select-disabled .ant-select-selector {
|
|
3033
3062
|
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3034
3063
|
}
|
|
@@ -3086,6 +3115,9 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3086
3115
|
border-radius: 4px;
|
|
3087
3116
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3088
3117
|
}
|
|
3118
|
+
.pro-form .pro-form-item-add .ant-input {
|
|
3119
|
+
background: var(--zaui-contract-bg, #fffaa1) !important;
|
|
3120
|
+
}
|
|
3089
3121
|
.pro-form .pro-form-item-add .ant-select.ant-select-disabled .ant-select-selector {
|
|
3090
3122
|
background: var(--zaui-contract-bg-add, #d2fff4) !important;
|
|
3091
3123
|
}
|
|
@@ -3139,10 +3171,23 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
3139
3171
|
background: var(--zaui-contract-bg-add, #d2fff4);
|
|
3140
3172
|
border-radius: 4px;
|
|
3141
3173
|
}
|
|
3142
|
-
.
|
|
3174
|
+
.original-value-tootip {
|
|
3175
|
+
max-width: 100%;
|
|
3176
|
+
width: -webkit-max-content;
|
|
3177
|
+
width: -moz-max-content;
|
|
3178
|
+
width: max-content;
|
|
3179
|
+
position: fixed;
|
|
3180
|
+
}
|
|
3181
|
+
.original-value-tootip .changed-tooltip .original-value-container .ant-space-item:nth-child(1) {
|
|
3143
3182
|
white-space: nowrap;
|
|
3144
3183
|
}
|
|
3145
|
-
.changed-tooltip .
|
|
3184
|
+
.original-value-tootip .changed-tooltip .original-value-container .pro-group .ant-space-compact {
|
|
3185
|
+
display: block;
|
|
3186
|
+
}
|
|
3187
|
+
.original-value-tootip .changed-tooltip .original-value-container .pro-group .pro-form-view-container {
|
|
3188
|
+
word-break: keep-all;
|
|
3189
|
+
}
|
|
3190
|
+
.original-value-tootip .changed-tooltip .current-value-container .ant-space-item:nth-child(1) {
|
|
3146
3191
|
white-space: nowrap;
|
|
3147
3192
|
}
|
|
3148
3193
|
.pro-upload .pro-upload-dragger .pro-upload-handle-box {
|
|
@@ -36,6 +36,7 @@ var ProDrawer = function ProDrawer(_ref) {
|
|
|
36
36
|
onCancel = _ref.onCancel,
|
|
37
37
|
children = _ref.children,
|
|
38
38
|
className = _ref.className,
|
|
39
|
+
zIndex = _ref.zIndex,
|
|
39
40
|
drawerProps = _ref.drawerProps;
|
|
40
41
|
var ref = useRef(null);
|
|
41
42
|
var modalRef = useRef(null);
|
|
@@ -192,7 +193,8 @@ var ProDrawer = function ProDrawer(_ref) {
|
|
|
192
193
|
placement: "right",
|
|
193
194
|
className: "pro-drawer ".concat(className !== null && className !== void 0 ? className : ''),
|
|
194
195
|
closable: false,
|
|
195
|
-
onClose: onCancel
|
|
196
|
+
onClose: onCancel,
|
|
197
|
+
zIndex: zIndex
|
|
196
198
|
}, drawerProps), {}, {
|
|
197
199
|
children: [_jsx("div", {
|
|
198
200
|
className: "pro-drawer-close",
|
|
@@ -35,8 +35,9 @@ var ProModal = function ProModal(_ref) {
|
|
|
35
35
|
onCancel = _ref.onCancel,
|
|
36
36
|
children = _ref.children,
|
|
37
37
|
className = _ref.className,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
extraLeft = _ref.extraLeft,
|
|
39
|
+
zIndex = _ref.zIndex,
|
|
40
|
+
modalProps = _ref.modalProps;
|
|
40
41
|
var ref = useRef(null);
|
|
41
42
|
var _ref2 = useScroll((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.parentNode) || {},
|
|
42
43
|
top = _ref2.top;
|
|
@@ -178,7 +179,8 @@ var ProModal = function ProModal(_ref) {
|
|
|
178
179
|
closeIcon: _jsx(ReactSVG, {
|
|
179
180
|
className: "close-icon",
|
|
180
181
|
src: closeSvg
|
|
181
|
-
})
|
|
182
|
+
}),
|
|
183
|
+
zIndex: zIndex
|
|
182
184
|
}, modalProps), {}, {
|
|
183
185
|
children: _jsx("div", {
|
|
184
186
|
ref: ref,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
1
|
import "antd/es/space/style";
|
|
3
2
|
import _Space from "antd/es/space";
|
|
4
3
|
import "antd/es/tooltip/style";
|
|
5
4
|
import _Tooltip from "antd/es/tooltip";
|
|
5
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
6
6
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
7
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
|
-
var _excluded = ["name", "names", "namesStr", "originalName", "originalNames", "originalValues", "form", "equalWith", "rowKeyPath", "children", "type", "normalize", "getValueProps", "valuePropName"];
|
|
8
|
+
var _excluded = ["name", "names", "namesStr", "originalName", "originalNames", "originalValues", "form", "equalWith", "rowKeyPath", "children", "type", "normalize", "getValueProps", "valuePropName", "viewRender", "diffConfig", "index"];
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
import React, { useMemo } from 'react';
|
|
10
|
+
import React, { useMemo, useRef } from 'react';
|
|
11
11
|
import classNames from 'classnames';
|
|
12
12
|
import { get } from 'lodash';
|
|
13
13
|
import { diffOriginal } from '../../../ProForm/utils/diffOriginal';
|
|
@@ -34,6 +34,7 @@ var getOriginalValue = function getOriginalValue(_ref) {
|
|
|
34
34
|
if (!originalValues) {
|
|
35
35
|
return undefined;
|
|
36
36
|
}
|
|
37
|
+
var originalValueRow;
|
|
37
38
|
if (rowKeyPath) {
|
|
38
39
|
var rowValueNamePath = namePath.slice(0, rowKeyPath.length - 1); // 表单中变动值所在行
|
|
39
40
|
var rowKeyName = rowKeyPath[rowKeyPath.length - 1]; // rowKey在行内的name
|
|
@@ -42,7 +43,7 @@ var getOriginalValue = function getOriginalValue(_ref) {
|
|
|
42
43
|
var keyValue = rowValue[rowKeyName]; // 获取表单中rowKey值
|
|
43
44
|
if (!keyValue) return undefined;
|
|
44
45
|
var originalValueList = get(originalValues, originalName.slice(0, rowKeyPath.length - 2));
|
|
45
|
-
|
|
46
|
+
originalValueRow = originalValueList === null || originalValueList === void 0 ? void 0 : originalValueList.find(function (item) {
|
|
46
47
|
return item[rowKeyPath[rowKeyPath.length - 1]] === keyValue;
|
|
47
48
|
});
|
|
48
49
|
var originalValue;
|
|
@@ -58,15 +59,21 @@ var getOriginalValue = function getOriginalValue(_ref) {
|
|
|
58
59
|
} else {
|
|
59
60
|
originalValue = get(originalValueRow, originalName.slice(rowKeyPath.length - 1));
|
|
60
61
|
}
|
|
61
|
-
return
|
|
62
|
+
return {
|
|
63
|
+
originalValue: originalValue,
|
|
64
|
+
originalValueRow: originalValueRow
|
|
65
|
+
};
|
|
62
66
|
}
|
|
63
67
|
// 这个方法是给editTable专用的 暂时不存在不传rowKey的情况
|
|
64
|
-
return
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
return {
|
|
69
|
+
originalValue: (originalNames === null || originalNames === void 0 ? void 0 : originalNames.length) ? originalNames.map(function (originalName) {
|
|
70
|
+
return get(originalValues, originalName);
|
|
71
|
+
}) : get(originalValues, originalName),
|
|
72
|
+
originalValueRow: originalValueRow
|
|
73
|
+
};
|
|
67
74
|
};
|
|
68
75
|
var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
69
|
-
var
|
|
76
|
+
var _diffConfig$toolTip, _children$props, _children$props2, _children$props3;
|
|
70
77
|
var name = props.name,
|
|
71
78
|
names = props.names,
|
|
72
79
|
namesStr = props.namesStr,
|
|
@@ -84,21 +91,30 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
|
84
91
|
getValueProps = props.getValueProps,
|
|
85
92
|
_props$valuePropName = props.valuePropName,
|
|
86
93
|
valuePropName = _props$valuePropName === void 0 ? 'value' : _props$valuePropName,
|
|
94
|
+
viewRender = props.viewRender,
|
|
95
|
+
diffConfig = props.diffConfig,
|
|
96
|
+
index = props.index,
|
|
87
97
|
rest = _objectWithoutProperties(props, _excluded);
|
|
88
98
|
var _ref2 = useProConfig('ProEditTable') || {},
|
|
89
99
|
isDiffAll = _ref2.isDiffAll;
|
|
100
|
+
var _ref3 = diffConfig || {},
|
|
101
|
+
_ref3$scrollFollowPar = _ref3.scrollFollowParent,
|
|
102
|
+
scrollFollowParent = _ref3$scrollFollowPar === void 0 ? true : _ref3$scrollFollowPar;
|
|
103
|
+
var contentRef = useRef(null);
|
|
90
104
|
var namePath = toNamePath(namesStr || name);
|
|
91
105
|
var originalNamePath = toNamePath(originalName);
|
|
92
106
|
var originalNamePaths = originalNames && toNamePaths(originalNames);
|
|
107
|
+
var toolTip = (_diffConfig$toolTip = diffConfig === null || diffConfig === void 0 ? void 0 : diffConfig.toolTip) !== null && _diffConfig$toolTip !== void 0 ? _diffConfig$toolTip : true;
|
|
93
108
|
var isWatch = Boolean(originalValues);
|
|
94
|
-
var
|
|
109
|
+
var originalDTO = getOriginalValue({
|
|
95
110
|
namePath: namePath,
|
|
96
111
|
originalName: originalNamePath,
|
|
97
112
|
originalNames: originalNamePaths,
|
|
98
113
|
originalValues: originalValues,
|
|
99
114
|
rowKeyPath: rowKeyPath,
|
|
100
115
|
form: form
|
|
101
|
-
})
|
|
116
|
+
});
|
|
117
|
+
var originalValue = isWatch ? originalDTO === null || originalDTO === void 0 ? void 0 : originalDTO.originalValue : undefined;
|
|
102
118
|
var noChange = !equalWith && (!originalValues || isDiffAll ? false : isEmpty(originalValue));
|
|
103
119
|
var diffType = useMemo(function () {
|
|
104
120
|
if (!isWatch || noChange) return 'same';
|
|
@@ -113,28 +129,75 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
|
|
|
113
129
|
}, [props[valuePropName], originalValue]);
|
|
114
130
|
var isAdd = diffType === 'add';
|
|
115
131
|
var isChanged = diffType === 'changed';
|
|
132
|
+
var tipContent = useMemo(function () {
|
|
133
|
+
var _getValueProps;
|
|
134
|
+
if (!isWatch || noChange) return undefined;
|
|
135
|
+
var orgValue = getValueProps && !names ? (_getValueProps = getValueProps(originalValue)) === null || _getValueProps === void 0 ? void 0 : _getValueProps[valuePropName] : originalValue;
|
|
136
|
+
// 兼容viewRender函数和Element场景
|
|
137
|
+
var _children = children;
|
|
138
|
+
if (viewRender) {
|
|
139
|
+
if (! /*#__PURE__*/React.isValidElement(viewRender)) {
|
|
140
|
+
return viewRender(orgValue, (originalDTO === null || originalDTO === void 0 ? void 0 : originalDTO.originalValueRow) || {}, {
|
|
141
|
+
form: form,
|
|
142
|
+
name: name,
|
|
143
|
+
index: index
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
_children = viewRender;
|
|
147
|
+
}
|
|
148
|
+
return /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children), {}, _defineProperty(_defineProperty({
|
|
149
|
+
// @ts-ignore
|
|
150
|
+
isView: true
|
|
151
|
+
}, valuePropName, orgValue), "checked", type === 'Switch' ? originalValue : undefined))) : undefined;
|
|
152
|
+
}, [originalValue, children]);
|
|
116
153
|
if (!isWatch || noChange) {
|
|
117
154
|
return /*#__PURE__*/React.isValidElement(children) && /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), rest));
|
|
118
155
|
}
|
|
156
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
157
|
+
// const isFocus = useFocus(contentRef.current);
|
|
158
|
+
var tipOpenCalc = function tipOpenCalc() {
|
|
159
|
+
if (!toolTip) return false;
|
|
160
|
+
// 传入undefined 鼠标移入显示移出隐藏
|
|
161
|
+
return isChanged ? undefined : false;
|
|
162
|
+
};
|
|
163
|
+
// @ts-ignore
|
|
164
|
+
var _showEllipse = ((_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.showEllipse) || ((_children$props2 = children.props) === null || _children$props2 === void 0 ? void 0 : _children$props2.tooltip);
|
|
119
165
|
var diffClassName = classNames({
|
|
120
166
|
'pro-form-item-changed': isChanged,
|
|
121
167
|
'pro-form-item-add': isAdd
|
|
122
168
|
});
|
|
169
|
+
var open = tipOpenCalc();
|
|
123
170
|
return _jsx(_Tooltip, {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return target.parentElement;
|
|
171
|
+
open: open,
|
|
172
|
+
getPopupContainer: function getPopupContainer(trigger) {
|
|
173
|
+
return scrollFollowParent ? trigger.parentElement : document.body;
|
|
128
174
|
},
|
|
175
|
+
overlayClassName: "original-value-tootip",
|
|
176
|
+
placement: "topLeft",
|
|
177
|
+
autoAdjustOverflow: false,
|
|
129
178
|
title: _jsxs(_Space, {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
179
|
+
direction: "vertical",
|
|
180
|
+
className: "changed-tooltip",
|
|
181
|
+
children: [_jsxs(_Space, {
|
|
182
|
+
align: "start",
|
|
183
|
+
className: "original-value-container",
|
|
184
|
+
children: ["\u521D\u59CB\u503C\uFF1A", tipContent]
|
|
185
|
+
}), _showEllipse && _jsxs(_Space, {
|
|
186
|
+
className: "current-value-container",
|
|
187
|
+
children: ["\u5F53\u524D\u503C\uFF1A", /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread(_objectSpread({}, children.props), rest), {}, {
|
|
188
|
+
isView: true,
|
|
189
|
+
scrollFollowParent: scrollFollowParent
|
|
190
|
+
})) : undefined]
|
|
191
|
+
})]
|
|
134
192
|
}),
|
|
135
193
|
children: _jsx("div", {
|
|
136
194
|
className: diffClassName,
|
|
137
|
-
children: /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, children.props), rest)
|
|
195
|
+
children: /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread(_objectSpread({}, children.props), rest), {}, {
|
|
196
|
+
scrollFollowParent: scrollFollowParent,
|
|
197
|
+
otherProps: _objectSpread(_objectSpread({}, (_children$props3 = children.props) === null || _children$props3 === void 0 ? void 0 : _children$props3.otherProps), {}, {
|
|
198
|
+
isDiffChange: isChanged
|
|
199
|
+
})
|
|
200
|
+
})) : undefined
|
|
138
201
|
})
|
|
139
202
|
});
|
|
140
203
|
};
|
|
@@ -73,7 +73,8 @@ var RenderField = function RenderField(_ref) {
|
|
|
73
73
|
rowDisabled = config.rowDisabled,
|
|
74
74
|
_config$validateTrigg = config.validateTrigger,
|
|
75
75
|
validateTrigger = _config$validateTrigg === void 0 ? ['onChange', 'onBlur', 'onSubmit'] : _config$validateTrigg,
|
|
76
|
-
otherProps = config.otherProps
|
|
76
|
+
otherProps = config.otherProps,
|
|
77
|
+
diffConfig = config.diffConfig;
|
|
77
78
|
var _fieldProps = fieldProps || formItemProps || {};
|
|
78
79
|
var _rules = rules || [];
|
|
79
80
|
var _required = required;
|
|
@@ -254,7 +255,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
254
255
|
if (typeof viewRender === 'function') {
|
|
255
256
|
var _column$dataIndex;
|
|
256
257
|
currentValue = (column === null || column === void 0 ? void 0 : (_column$dataIndex = column.dataIndex) === null || _column$dataIndex === void 0 ? void 0 : _column$dataIndex.includes('-')) ? value : currentValue;
|
|
257
|
-
var View = viewRender(currentValue, record, options);
|
|
258
|
+
var View = viewRender(currentValue, record || {}, options);
|
|
258
259
|
TargetComponent = _jsx(Container, {
|
|
259
260
|
viewEmpty: viewEmpty,
|
|
260
261
|
children: View
|
|
@@ -560,6 +561,9 @@ var RenderField = function RenderField(_ref) {
|
|
|
560
561
|
valuePropName: _formItemProps.valuePropName,
|
|
561
562
|
normalize: _formItemProps.normalize,
|
|
562
563
|
getValueProps: _formItemProps.getValueProps,
|
|
564
|
+
viewRender: viewRender,
|
|
565
|
+
diffConfig: diffConfig,
|
|
566
|
+
index: index,
|
|
563
567
|
children: FieldComponent
|
|
564
568
|
});
|
|
565
569
|
}
|
package/es/ProEditTable/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
9
9
|
import "antd/es/form/style";
|
|
10
10
|
import _Form from "antd/es/form";
|
|
11
11
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
12
|
-
var _excluded = ["value", "onChange", "onDrag", "className", "columns", "type", "mode", "stripe", "draggable", "virtual", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "toolbarSticky", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "
|
|
12
|
+
var _excluded = ["value", "onChange", "onDrag", "className", "columns", "type", "mode", "stripe", "draggable", "virtual", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "toolbarSticky", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "rowKey", "rowDisabled", "rowDraggable", "footerRender", "scroll", "actionDirection", "diffConfig"];
|
|
13
13
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
15
15
|
import { get, isArray, isBoolean } from 'lodash';
|
|
@@ -23,7 +23,7 @@ import Empty from '../assets/empty.png';
|
|
|
23
23
|
import locale, { formatMessage } from '../locale';
|
|
24
24
|
import { BaseTable, DraggableTable, VirtualTable } from './components/RcTable';
|
|
25
25
|
var ProEditTable = function ProEditTable(_ref, ref) {
|
|
26
|
-
var _resetProps$id, _resetProps$id$split, _themeConfig$data2;
|
|
26
|
+
var _resetProps$id, _resetProps$id$split, _themeConfig$data2, _resetProps$otherProp;
|
|
27
27
|
var value = _ref.value,
|
|
28
28
|
onChange = _ref.onChange,
|
|
29
29
|
onDrag = _ref.onDrag,
|
|
@@ -51,13 +51,13 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
51
51
|
headerRender = _ref.headerRender,
|
|
52
52
|
pagination = _ref.pagination,
|
|
53
53
|
originalValues = _ref.originalValues,
|
|
54
|
-
originalDiffTip = _ref.originalDiffTip,
|
|
55
54
|
rowKey = _ref.rowKey,
|
|
56
55
|
rowDisabled = _ref.rowDisabled,
|
|
57
56
|
rowDraggable = _ref.rowDraggable,
|
|
58
57
|
footerRender = _ref.footerRender,
|
|
59
58
|
scroll = _ref.scroll,
|
|
60
59
|
actionDirection = _ref.actionDirection,
|
|
60
|
+
diffConfig = _ref.diffConfig,
|
|
61
61
|
resetProps = _objectWithoutProperties(_ref, _excluded);
|
|
62
62
|
// 上下文form
|
|
63
63
|
var contentForm = _Form.useFormInstance();
|
|
@@ -89,7 +89,6 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
89
89
|
return (_ref2 = (_themeConfig$data$zau = themeConfig === null || themeConfig === void 0 ? void 0 : (_themeConfig$data = themeConfig.data) === null || _themeConfig$data === void 0 ? void 0 : _themeConfig$data.zauiFormAlign) !== null && _themeConfig$data$zau !== void 0 ? _themeConfig$data$zau : configRequiredAlign) !== null && _ref2 !== void 0 ? _ref2 : 'left';
|
|
90
90
|
}, [themeConfig === null || themeConfig === void 0 ? void 0 : (_themeConfig$data2 = themeConfig.data) === null || _themeConfig$data2 === void 0 ? void 0 : _themeConfig$data2.zauiFormAlign]);
|
|
91
91
|
var _useSetState = useSetState({
|
|
92
|
-
_columns: columns,
|
|
93
92
|
cellNamePath: [],
|
|
94
93
|
forceUpdate: {},
|
|
95
94
|
editingKeys: [],
|
|
@@ -167,10 +166,10 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
167
166
|
tableLength: value === null || value === void 0 ? void 0 : value.length,
|
|
168
167
|
page: page,
|
|
169
168
|
originalValues: originalValues,
|
|
170
|
-
originalDiffTip: originalDiffTip,
|
|
171
169
|
prefixCls: prefixCls,
|
|
172
170
|
rowDisabled: rowDisabled,
|
|
173
|
-
actionDirection: actionDirection
|
|
171
|
+
actionDirection: actionDirection,
|
|
172
|
+
diffConfig: _objectSpread(_objectSpread({}, resetProps === null || resetProps === void 0 ? void 0 : (_resetProps$otherProp = resetProps.otherProps) === null || _resetProps$otherProp === void 0 ? void 0 : _resetProps$otherProp.diffConfig), diffConfig)
|
|
174
173
|
}, resetProps);
|
|
175
174
|
// 编辑行设置下样式
|
|
176
175
|
var _rowClassName = function _rowClassName(record) {
|
|
@@ -275,8 +274,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
275
274
|
var _columns = useMemo(function () {
|
|
276
275
|
return transformColumns(columns, config);
|
|
277
276
|
}, [valueChangeRef.current, disabled, forceUpdate, columns, page, actionProps, editingKeys, cellNamePath]);
|
|
278
|
-
|
|
279
|
-
var _value$every, _originalArr$every;
|
|
277
|
+
var initDataSource = function initDataSource() {
|
|
278
|
+
var _value$every, _originalArr$every, _value$some, _originalArr$some;
|
|
280
279
|
var isAllHasKey = value === null || value === void 0 ? void 0 : (_value$every = value.every) === null || _value$every === void 0 ? void 0 : _value$every.call(value, function (item) {
|
|
281
280
|
return item.rowKey;
|
|
282
281
|
});
|
|
@@ -285,8 +284,15 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
285
284
|
var isOriginalAllHasKey = originalArr ? originalArr === null || originalArr === void 0 ? void 0 : (_originalArr$every = originalArr.every) === null || _originalArr$every === void 0 ? void 0 : _originalArr$every.call(originalArr, function (item) {
|
|
286
285
|
return item.rowKey;
|
|
287
286
|
}) : true;
|
|
287
|
+
// 检测当前rowkey是否与制定key的值是否一致,不一致,则执行覆盖
|
|
288
|
+
var isNeedCover = value === null || value === void 0 ? void 0 : (_value$some = value.some) === null || _value$some === void 0 ? void 0 : _value$some.call(value, function (item) {
|
|
289
|
+
return item.rowKey !== getRowKey(item);
|
|
290
|
+
});
|
|
291
|
+
var isNeedCoverOriginal = originalArr === null || originalArr === void 0 ? void 0 : (_originalArr$some = originalArr.some) === null || _originalArr$some === void 0 ? void 0 : _originalArr$some.call(originalArr, function (item) {
|
|
292
|
+
return item.rowKey !== getRowKey(item);
|
|
293
|
+
});
|
|
288
294
|
// 初始化默认生成row-key
|
|
289
|
-
if ((value === null || value === void 0 ? void 0 : value.length) && !isAllHasKey || (originalArr === null || originalArr === void 0 ? void 0 : originalArr.length) && !isOriginalAllHasKey) {
|
|
295
|
+
if ((value === null || value === void 0 ? void 0 : value.length) && (!isAllHasKey || isNeedCover) || (originalArr === null || originalArr === void 0 ? void 0 : originalArr.length) && (!isOriginalAllHasKey || isNeedCoverOriginal)) {
|
|
290
296
|
var _originalArr$forEach;
|
|
291
297
|
var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
|
|
292
298
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -301,6 +307,9 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
301
307
|
form.setFieldValue(virtualRowName, nextValues);
|
|
302
308
|
}
|
|
303
309
|
}
|
|
310
|
+
};
|
|
311
|
+
useEffect(function () {
|
|
312
|
+
initDataSource();
|
|
304
313
|
}, [value, originalValues]);
|
|
305
314
|
useImperativeHandle((resetProps === null || resetProps === void 0 ? void 0 : resetProps.ref) || ref, function () {
|
|
306
315
|
return {
|
|
@@ -109,7 +109,6 @@ export interface ProColumnsProps<Values = any, T = any> extends Omit<FormItemPro
|
|
|
109
109
|
}
|
|
110
110
|
export type ProEditTableColumnsProps<K = any> = ProColumnsProps & ColumnPropsMap<K, 'ProEditTable'>;
|
|
111
111
|
export interface State {
|
|
112
|
-
_columns: ProEditTableColumnsProps[];
|
|
113
112
|
cellNamePath: NamePath[];
|
|
114
113
|
forceUpdate: {};
|
|
115
114
|
editingKeys: string[];
|
|
@@ -139,11 +138,6 @@ export interface ProEditTableProps<T = any> extends Omit<TableProps<T>, 'onChang
|
|
|
139
138
|
* @description 原始数据源,是否tooltip显示
|
|
140
139
|
* @default -
|
|
141
140
|
*/
|
|
142
|
-
originalDiffTip?: boolean;
|
|
143
|
-
/**
|
|
144
|
-
* @description 可编辑表格的类型,单行、多行、单元格编辑
|
|
145
|
-
* @default false
|
|
146
|
-
*/
|
|
147
141
|
mode?: 'single' | 'multiple' | 'cell';
|
|
148
142
|
/**
|
|
149
143
|
* @description 可编辑表格的类型,单行编辑或者多行编辑
|
|
@@ -276,4 +270,7 @@ export interface ProEditTableProps<T = any> extends Omit<TableProps<T>, 'onChang
|
|
|
276
270
|
ref?: any;
|
|
277
271
|
actionDirection?: 'vertical' | 'horizontal';
|
|
278
272
|
validateTrigger?: string | string[];
|
|
273
|
+
diffConfig?: {
|
|
274
|
+
scrollFollowParent?: boolean;
|
|
275
|
+
};
|
|
279
276
|
}
|
|
@@ -335,14 +335,21 @@ export var transformColumns = function transformColumns() {
|
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
337
|
// 单行多行交互有较大差异
|
|
338
|
-
return
|
|
338
|
+
return _jsxs("div", {
|
|
339
339
|
className: cellClassName,
|
|
340
340
|
onClick: function onClick() {
|
|
341
341
|
isCanEdit && setState({
|
|
342
342
|
cellNamePath: cellName
|
|
343
343
|
});
|
|
344
344
|
},
|
|
345
|
-
children: _jsx(
|
|
345
|
+
children: [index === 0 && !item.width ? _jsx("div", {
|
|
346
|
+
style: {
|
|
347
|
+
visibility: 'hidden',
|
|
348
|
+
height: 0,
|
|
349
|
+
paddingLeft: (item === null || item === void 0 ? void 0 : item.required) ? 16 : 0
|
|
350
|
+
},
|
|
351
|
+
children: columnTitle
|
|
352
|
+
}) : null, _jsx(RenderField, {
|
|
346
353
|
text: _text,
|
|
347
354
|
record: record,
|
|
348
355
|
index: index,
|
|
@@ -351,7 +358,7 @@ export var transformColumns = function transformColumns() {
|
|
|
351
358
|
cellName: cellName,
|
|
352
359
|
isEditing: isEditing // 是否正在编辑
|
|
353
360
|
})
|
|
354
|
-
})
|
|
361
|
+
})]
|
|
355
362
|
});
|
|
356
363
|
};
|
|
357
364
|
item.render = _render;
|
package/es/ProEnum/index.js
CHANGED
|
@@ -43,7 +43,7 @@ var ProEnum = function ProEnum(props) {
|
|
|
43
43
|
enumProps = _objectWithoutProperties(props, _excluded);
|
|
44
44
|
var _ref = otherProps || {},
|
|
45
45
|
viewEmpty = _ref.viewEmpty;
|
|
46
|
-
var _isView = isView
|
|
46
|
+
var _isView = isView !== undefined && isView !== null ? isView : otherProps === null || otherProps === void 0 ? void 0 : otherProps.isView;
|
|
47
47
|
var _ref2 = useProConfig('ProEnum') || {},
|
|
48
48
|
fieldNames = _ref2.fieldNames,
|
|
49
49
|
_ref2$clear = _ref2.clear,
|
|
@@ -286,7 +286,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
286
286
|
autoComplete: "off",
|
|
287
287
|
placeholder: placeholder || "".concat(locale.ProForm.inputPlaceholder).concat(label !== null && label !== void 0 ? label : ''),
|
|
288
288
|
className: _className
|
|
289
|
-
},
|
|
289
|
+
}, initialConfig), valueProps), rest), {}, {
|
|
290
290
|
onBlur: handleBlur,
|
|
291
291
|
onFocus: handleFocus,
|
|
292
292
|
min: _min,
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { InternalNamePath } from 'antd/es/form/interface';
|
|
4
4
|
import type { levelType } from '../../../../../ProLayout/components/ProCollapse/PropTypes';
|
|
5
5
|
import type { FormListProps } from '../propsType';
|
|
6
|
+
import { DiffConfigProps } from '../../../../propsType';
|
|
6
7
|
interface Props extends Omit<FormListProps, 'toolbarProps'> {
|
|
7
8
|
index: number;
|
|
8
9
|
namePath: InternalNamePath;
|
|
@@ -14,6 +15,7 @@ interface Props extends Omit<FormListProps, 'toolbarProps'> {
|
|
|
14
15
|
};
|
|
15
16
|
level?: levelType;
|
|
16
17
|
towCollapse?: boolean;
|
|
18
|
+
diffConfig?: DiffConfigProps;
|
|
17
19
|
}
|
|
18
20
|
declare const BlockFields: React.FC<Props>;
|
|
19
21
|
export default BlockFields;
|