@zat-design/sisyphus-react 3.4.5 → 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 +140 -35
- package/dist/less.esm.css +140 -35
- package/es/ProConfigProvider/index.d.ts +2 -2
- package/es/ProConfigProvider/index.js +0 -3
- package/es/ProEditTable/components/RenderField/index.js +55 -48
- package/es/ProEditTable/index.js +3 -3
- 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/Container/index.js +3 -2
- package/es/ProForm/components/combination/Container/style/index.less +5 -1
- package/es/ProForm/components/combination/{ProAddressBar → ProCascader}/index.d.ts +2 -2
- package/es/ProForm/components/combination/ProCascader/index.js +256 -0
- package/es/ProForm/components/combination/{ProAddressBar → ProCascader}/propsType.d.ts +9 -6
- 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 +13 -5
- 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/index.d.ts +1 -2
- package/es/ProForm/components/index.js +1 -4
- package/es/ProForm/components/render/Render.js +18 -13
- package/es/ProForm/components/render/RenderFields.js +3 -1
- package/es/ProForm/components/render/propsType.d.ts +3 -7
- package/es/ProForm/index.js +6 -2
- package/es/ProForm/propsType.d.ts +2 -0
- package/es/ProForm/style/index.less +2 -1
- package/es/ProForm/utils/index.js +4 -1
- 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/config/index.d.ts +2 -0
- package/es/ProIcon/config/index.js +4 -2
- package/es/ProIcon/index.js +148 -81
- package/es/ProIcon/propsTypes.d.ts +6 -1
- package/es/ProIcon/utils/index.d.ts +5 -0
- package/es/ProIcon/utils/index.js +60 -0
- package/es/ProLayout/components/ProCollapse/index.js +6 -3
- package/es/ProLayout/components/ProCollapse/style/index.less +1 -1
- package/es/ProSelect/index.js +1 -1
- package/es/ProStep/components/Step/index.js +4 -3
- package/es/ProStep/style/index.less +37 -0
- package/es/ProTable/utils.js +6 -3
- package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +16 -6
- package/es/ProThemeTools/component/PrdTools/style/index.less +56 -48
- 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/es/global.less +6 -6
- package/lib/ProConfigProvider/index.d.ts +2 -2
- package/lib/ProConfigProvider/index.js +0 -3
- package/lib/ProEditTable/components/RenderField/index.js +53 -46
- package/lib/ProEditTable/index.js +3 -3
- 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/Container/index.js +3 -2
- package/lib/ProForm/components/combination/Container/style/index.less +5 -1
- package/lib/ProForm/components/combination/{ProAddressBar → ProCascader}/index.d.ts +2 -2
- package/lib/ProForm/components/combination/ProCascader/index.js +256 -0
- package/lib/ProForm/components/combination/{ProAddressBar → ProCascader}/propsType.d.ts +9 -6
- 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 +12 -4
- 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/index.d.ts +1 -2
- package/lib/ProForm/components/index.js +1 -8
- package/lib/ProForm/components/render/Render.js +18 -13
- package/lib/ProForm/components/render/RenderFields.js +3 -1
- package/lib/ProForm/components/render/propsType.d.ts +3 -7
- package/lib/ProForm/index.js +5 -1
- package/lib/ProForm/propsType.d.ts +2 -0
- package/lib/ProForm/style/index.less +2 -1
- package/lib/ProForm/utils/index.js +4 -1
- 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/config/index.d.ts +2 -0
- package/lib/ProIcon/config/index.js +4 -2
- package/lib/ProIcon/index.js +144 -77
- package/lib/ProIcon/propsTypes.d.ts +6 -1
- package/lib/ProIcon/utils/index.d.ts +5 -0
- package/lib/ProIcon/utils/index.js +62 -1
- package/lib/ProLayout/components/ProCollapse/index.js +6 -3
- package/lib/ProLayout/components/ProCollapse/style/index.less +1 -1
- package/lib/ProSelect/index.js +1 -1
- package/lib/ProStep/components/Step/index.js +4 -3
- package/lib/ProStep/style/index.less +37 -0
- package/lib/ProTable/utils.js +6 -3
- package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +16 -6
- package/lib/ProThemeTools/component/PrdTools/style/index.less +56 -48
- 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/lib/global.less +6 -6
- package/package.json +2 -2
- package/es/ProForm/components/base/ProCascader/index.d.ts +0 -14
- package/es/ProForm/components/base/ProCascader/index.js +0 -72
- package/es/ProForm/components/combination/ProAddressBar/index.js +0 -437
- package/lib/ProForm/components/base/ProCascader/index.d.ts +0 -14
- package/lib/ProForm/components/base/ProCascader/index.js +0 -78
- package/lib/ProForm/components/combination/ProAddressBar/index.js +0 -437
- /package/es/ProForm/components/combination/{ProAddressBar → ProCascader}/propsType.js +0 -0
- /package/es/ProForm/components/combination/{ProAddressBar → ProCascader}/style/index.less +0 -0
- /package/lib/ProForm/components/combination/{ProAddressBar → ProCascader}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProAddressBar → ProCascader}/style/index.less +0 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import "antd/es/input/style";
|
|
2
|
+
import _Input from "antd/es/input";
|
|
3
|
+
import "antd/es/cascader/style";
|
|
4
|
+
import _Cascader from "antd/es/cascader";
|
|
5
|
+
import "antd/es/tooltip/style";
|
|
6
|
+
import _Tooltip from "antd/es/tooltip";
|
|
7
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
8
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
9
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
10
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
11
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
12
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
13
|
+
import "antd/es/typography/style";
|
|
14
|
+
import _Typography from "antd/es/typography";
|
|
15
|
+
var _excluded = ["className", "hasDetail", "detailMaxLength", "fieldNames", "value", "disabled", "dataSource", "onChange", "useRequest", "transformResponse", "level", "isView", "enumCode", "code", "tooltip", "separator"];
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { useEffect, useState, memo, useMemo } from 'react';
|
|
18
|
+
import { isEqual, omit } from 'lodash';
|
|
19
|
+
import { transformDataName } from './utils/index';
|
|
20
|
+
import { useProConfig } from '../../../../ProConfigProvider';
|
|
21
|
+
import useEnum from '../../../../ProEnum/hooks/useEnum';
|
|
22
|
+
import locale from '../../../../locale';
|
|
23
|
+
import ProForm from '../../..';
|
|
24
|
+
var Text = _Typography.Text;
|
|
25
|
+
var filterDataSource = function filterDataSource(dataSource, level) {
|
|
26
|
+
return dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (item) {
|
|
27
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
28
|
+
children: level === 1 ? [] : filterDataSource(item === null || item === void 0 ? void 0 : item.children, level - 1)
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
var getViewLabel = function getViewLabel(_ref) {
|
|
33
|
+
var dataSource = _ref.dataSource,
|
|
34
|
+
value = _ref.value;
|
|
35
|
+
var viewLabel = [];
|
|
36
|
+
// 根据dataSource得到label数组,查看模式展示需要
|
|
37
|
+
value === null || value === void 0 ? void 0 : value.forEach(function (value, index) {
|
|
38
|
+
var _dataSource;
|
|
39
|
+
var temp = (_dataSource = dataSource) === null || _dataSource === void 0 ? void 0 : _dataSource.find(function (item) {
|
|
40
|
+
return (item === null || item === void 0 ? void 0 : item.value) === value;
|
|
41
|
+
});
|
|
42
|
+
dataSource = (temp === null || temp === void 0 ? void 0 : temp.children) || [];
|
|
43
|
+
viewLabel[index] = temp === null || temp === void 0 ? void 0 : temp.label;
|
|
44
|
+
});
|
|
45
|
+
return viewLabel;
|
|
46
|
+
};
|
|
47
|
+
var defaultFieldNames = {
|
|
48
|
+
label: 'name',
|
|
49
|
+
value: 'code',
|
|
50
|
+
children: 'children'
|
|
51
|
+
};
|
|
52
|
+
var ProCascader = function ProCascader(props) {
|
|
53
|
+
var _value$slice, _ref7, _ref7$filter, _defaultLabel$filter, _locale$ProAddressBar, _locale$ProAddressBar2;
|
|
54
|
+
var _ref2 = useProConfig('ProAddressBar') || {},
|
|
55
|
+
configDetailMaxLength = _ref2.detailMaxLength,
|
|
56
|
+
configEnumCode = _ref2.enumCode,
|
|
57
|
+
configCode = _ref2.code;
|
|
58
|
+
var isAddressMode = (props === null || props === void 0 ? void 0 : props.mode) === 'address';
|
|
59
|
+
var _props$className = props.className,
|
|
60
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
61
|
+
_props$hasDetail = props.hasDetail,
|
|
62
|
+
hasDetail = _props$hasDetail === void 0 ? isAddressMode ? true : undefined : _props$hasDetail,
|
|
63
|
+
_props$detailMaxLengt = props.detailMaxLength,
|
|
64
|
+
detailMaxLength = _props$detailMaxLengt === void 0 ? isAddressMode ? configDetailMaxLength || 100 : 100 : _props$detailMaxLengt,
|
|
65
|
+
_props$fieldNames = props.fieldNames,
|
|
66
|
+
fieldNames = _props$fieldNames === void 0 ? defaultFieldNames : _props$fieldNames,
|
|
67
|
+
value = props.value,
|
|
68
|
+
disabled = props.disabled,
|
|
69
|
+
dataSource = props.dataSource,
|
|
70
|
+
onChange = props.onChange,
|
|
71
|
+
useRequest = props.useRequest,
|
|
72
|
+
transformResponse = props.transformResponse,
|
|
73
|
+
_props$level = props.level,
|
|
74
|
+
level = _props$level === void 0 ? isAddressMode ? 3 : undefined : _props$level,
|
|
75
|
+
isView = props.isView,
|
|
76
|
+
_props$enumCode = props.enumCode,
|
|
77
|
+
enumCode = _props$enumCode === void 0 ? configEnumCode : _props$enumCode,
|
|
78
|
+
_props$code = props.code,
|
|
79
|
+
code = _props$code === void 0 ? configCode : _props$code,
|
|
80
|
+
tooltip = props.tooltip,
|
|
81
|
+
_props$separator = props.separator,
|
|
82
|
+
separator = _props$separator === void 0 ? '' : _props$separator,
|
|
83
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
84
|
+
var _ref3 = ProForm.useFieldProps() || {},
|
|
85
|
+
isViewCon = _ref3.isView;
|
|
86
|
+
var addressCode = code || enumCode;
|
|
87
|
+
var realIsView = typeof isView === 'boolean' ? isView : isViewCon;
|
|
88
|
+
var realLevel = Math.max(2, level);
|
|
89
|
+
var detail = value === null || value === void 0 ? void 0 : value[realLevel];
|
|
90
|
+
var enumData = useEnum(addressCode);
|
|
91
|
+
var _ref4 = Array.isArray(enumData) ? enumData : [],
|
|
92
|
+
_ref5 = _slicedToArray(_ref4, 1),
|
|
93
|
+
_ref5$ = _ref5[0],
|
|
94
|
+
enumDataSource = _ref5$ === void 0 ? [] : _ref5$;
|
|
95
|
+
var realDataSource = useMemo(function () {
|
|
96
|
+
var innerDataSource = dataSource || (addressCode ? enumDataSource : []);
|
|
97
|
+
var result = isAddressMode && realLevel === 2 ? filterDataSource(innerDataSource, level) : innerDataSource;
|
|
98
|
+
return isEqual(fieldNames, defaultFieldNames) ? result : transformDataName(result, fieldNames);
|
|
99
|
+
}, [isAddressMode, addressCode, realLevel, dataSource, enumDataSource === null || enumDataSource === void 0 ? void 0 : enumDataSource.length]);
|
|
100
|
+
var _useRequest = _objectSpread({}, useRequest),
|
|
101
|
+
service = _useRequest.service,
|
|
102
|
+
_useRequest$defaultPa = _useRequest.defaultParams,
|
|
103
|
+
defaultParams = _useRequest$defaultPa === void 0 ? {} : _useRequest$defaultPa;
|
|
104
|
+
var _useState = useState([]),
|
|
105
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
106
|
+
serviceData = _useState2[0],
|
|
107
|
+
setServiceData = _useState2[1];
|
|
108
|
+
var _useState3 = useState([]),
|
|
109
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
110
|
+
defaultLabel = _useState4[0],
|
|
111
|
+
setDefaultLabel = _useState4[1];
|
|
112
|
+
var getFirstLevelOptions = /*#__PURE__*/function () {
|
|
113
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
114
|
+
var _yield$service, data, newData, transFormData, serviceData;
|
|
115
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
116
|
+
while (1) switch (_context.prev = _context.next) {
|
|
117
|
+
case 0:
|
|
118
|
+
_context.next = 2;
|
|
119
|
+
return service(defaultParams);
|
|
120
|
+
case 2:
|
|
121
|
+
_yield$service = _context.sent;
|
|
122
|
+
data = _yield$service.data;
|
|
123
|
+
newData = data;
|
|
124
|
+
if (transformResponse) {
|
|
125
|
+
newData = transformResponse(data);
|
|
126
|
+
}
|
|
127
|
+
transFormData = transformDataName(newData, {
|
|
128
|
+
label: fieldNames.label,
|
|
129
|
+
value: fieldNames.value,
|
|
130
|
+
children: (fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.children) || 'children'
|
|
131
|
+
});
|
|
132
|
+
serviceData = isAddressMode && realLevel === 2 ? filterDataSource(transFormData, level) : transFormData;
|
|
133
|
+
setServiceData(serviceData);
|
|
134
|
+
case 9:
|
|
135
|
+
case "end":
|
|
136
|
+
return _context.stop();
|
|
137
|
+
}
|
|
138
|
+
}, _callee);
|
|
139
|
+
}));
|
|
140
|
+
return function getFirstLevelOptions() {
|
|
141
|
+
return _ref6.apply(this, arguments);
|
|
142
|
+
};
|
|
143
|
+
}();
|
|
144
|
+
useEffect(function () {
|
|
145
|
+
if (service) {
|
|
146
|
+
// 传入useRequest时,初次加载级联第一级数据源
|
|
147
|
+
getFirstLevelOptions();
|
|
148
|
+
}
|
|
149
|
+
}, [service]);
|
|
150
|
+
useEffect(function () {
|
|
151
|
+
if (realIsView && value) {
|
|
152
|
+
// 传入dataSource + 查看时初始化展示
|
|
153
|
+
if (service) {
|
|
154
|
+
setDefaultLabel(getViewLabel({
|
|
155
|
+
dataSource: serviceData,
|
|
156
|
+
value: isAddressMode && hasDetail ? value === null || value === void 0 ? void 0 : value.slice(0, realLevel) : value
|
|
157
|
+
}));
|
|
158
|
+
} else if ((realDataSource === null || realDataSource === void 0 ? void 0 : realDataSource.length) > 0) {
|
|
159
|
+
setDefaultLabel(getViewLabel({
|
|
160
|
+
dataSource: realDataSource,
|
|
161
|
+
value: isAddressMode && hasDetail ? value === null || value === void 0 ? void 0 : value.slice(0, realLevel) : value
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}, [realIsView, value, realDataSource, serviceData]);
|
|
166
|
+
var handleChange = function handleChange(changeValue, selectedOptions) {
|
|
167
|
+
if (onChange) {
|
|
168
|
+
if (isAddressMode && hasDetail && detail) {
|
|
169
|
+
// 有详情地址
|
|
170
|
+
var realValue = changeValue || [];
|
|
171
|
+
realValue[realLevel] = detail;
|
|
172
|
+
onChange(realValue, selectedOptions);
|
|
173
|
+
} else {
|
|
174
|
+
onChange(changeValue, selectedOptions);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
// showSearch中的筛选函数
|
|
179
|
+
var handlefilter = function handlefilter(inputValue, path) {
|
|
180
|
+
return path.some(function (option) {
|
|
181
|
+
return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
var handleAddressChange = function handleAddressChange(e) {
|
|
185
|
+
var cascaderValue = value === null || value === void 0 ? void 0 : value.slice(0, realLevel);
|
|
186
|
+
if (onChange) {
|
|
187
|
+
if (!e.target.value && (cascaderValue === null || cascaderValue === void 0 ? void 0 : cascaderValue.every(function (item) {
|
|
188
|
+
return !item;
|
|
189
|
+
}))) {
|
|
190
|
+
onChange(undefined);
|
|
191
|
+
} else {
|
|
192
|
+
var realValue = value ? _toConsumableArray(value) : [];
|
|
193
|
+
realValue[realLevel] = e.target.value;
|
|
194
|
+
onChange(realValue);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
var displayRender = function displayRender(label) {
|
|
199
|
+
return label === null || label === void 0 ? void 0 : label.filter(function (item) {
|
|
200
|
+
return !!item;
|
|
201
|
+
}).join('/');
|
|
202
|
+
};
|
|
203
|
+
var addressValue = isAddressMode ? value && ((_value$slice = value.slice(0, realLevel)) === null || _value$slice === void 0 ? void 0 : _value$slice.some(function (item) {
|
|
204
|
+
return !!item;
|
|
205
|
+
})) ? value.slice(0, realLevel) : undefined : value;
|
|
206
|
+
var viewValue = isAddressMode ? ((_ref7 = [].concat(_toConsumableArray(defaultLabel), [value === null || value === void 0 ? void 0 : value[realLevel]])) === null || _ref7 === void 0 ? void 0 : (_ref7$filter = _ref7.filter(function (item) {
|
|
207
|
+
return !!item;
|
|
208
|
+
})) === null || _ref7$filter === void 0 ? void 0 : _ref7$filter.join(separator)) || '-' : (defaultLabel === null || defaultLabel === void 0 ? void 0 : (_defaultLabel$filter = defaultLabel.filter(function (item) {
|
|
209
|
+
return !!item;
|
|
210
|
+
})) === null || _defaultLabel$filter === void 0 ? void 0 : _defaultLabel$filter.join(separator)) || '-';
|
|
211
|
+
return realIsView ? tooltip ? _jsx(_Tooltip, {
|
|
212
|
+
className: className,
|
|
213
|
+
title: tooltip === true ? viewValue : tooltip,
|
|
214
|
+
children: _jsx(Text, {
|
|
215
|
+
ellipsis: {
|
|
216
|
+
tooltip: false
|
|
217
|
+
},
|
|
218
|
+
children: viewValue
|
|
219
|
+
})
|
|
220
|
+
}) : _jsx("span", {
|
|
221
|
+
className: className,
|
|
222
|
+
children: viewValue
|
|
223
|
+
}) : _jsxs("div", {
|
|
224
|
+
className: "pro-address ".concat(className),
|
|
225
|
+
children: [_jsx(_Cascader, _objectSpread({
|
|
226
|
+
className: hasDetail ? '' : 'no-detail',
|
|
227
|
+
placeholder: locale === null || locale === void 0 ? void 0 : (_locale$ProAddressBar = locale.ProAddressBar) === null || _locale$ProAddressBar === void 0 ? void 0 : _locale$ProAddressBar.placeholder,
|
|
228
|
+
value: addressValue,
|
|
229
|
+
options: service ? serviceData : realDataSource,
|
|
230
|
+
disabled: disabled,
|
|
231
|
+
displayRender: displayRender,
|
|
232
|
+
showSearch: {
|
|
233
|
+
filter: handlefilter
|
|
234
|
+
},
|
|
235
|
+
onChange: handleChange
|
|
236
|
+
}, omit(otherProps, 'otherProps'))), hasDetail && (tooltip && disabled && detail ? _jsx(_Tooltip, {
|
|
237
|
+
title: detail,
|
|
238
|
+
children: _jsx("span", {
|
|
239
|
+
className: "pro-address-detail",
|
|
240
|
+
children: _jsx(_Input, {
|
|
241
|
+
disabled: disabled,
|
|
242
|
+
value: detail
|
|
243
|
+
})
|
|
244
|
+
})
|
|
245
|
+
}) : _jsx(_Input, {
|
|
246
|
+
allowClear: true,
|
|
247
|
+
autoComplete: "off",
|
|
248
|
+
disabled: disabled,
|
|
249
|
+
value: detail,
|
|
250
|
+
maxLength: detailMaxLength,
|
|
251
|
+
placeholder: locale === null || locale === void 0 ? void 0 : (_locale$ProAddressBar2 = locale.ProAddressBar) === null || _locale$ProAddressBar2 === void 0 ? void 0 : _locale$ProAddressBar2.detailPlaceholder,
|
|
252
|
+
onChange: handleAddressChange
|
|
253
|
+
}))]
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
export default /*#__PURE__*/memo(ProCascader);
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DefaultOptionType } from 'rc-select/lib/Select';
|
|
3
3
|
import { Service } from 'ahooks/lib/useRequest/src/types';
|
|
4
|
-
export interface
|
|
5
|
-
|
|
4
|
+
export interface fieldNamesProps {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
children?: string;
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ProCascaderProps {
|
|
6
11
|
className?: string;
|
|
12
|
+
mode?: 'address' | 'default';
|
|
7
13
|
isView?: boolean;
|
|
8
14
|
value?: string[];
|
|
9
15
|
disabled?: boolean;
|
|
10
16
|
hasDetail?: boolean;
|
|
11
17
|
tooltip?: boolean | ReactNode;
|
|
12
18
|
detailMaxLength?: number;
|
|
13
|
-
fieldNames?:
|
|
14
|
-
label: string;
|
|
15
|
-
value: string;
|
|
16
|
-
};
|
|
19
|
+
fieldNames?: fieldNamesProps;
|
|
17
20
|
dataSource?: DefaultOptionType[];
|
|
18
21
|
useRequest?: {
|
|
19
22
|
loadData?: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface DataNode {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
children?: DataNode[];
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
interface FieldNames {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
children?: string;
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const transformDataName: (dataSource: any[], fieldNames: FieldNames) => DataNode[];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["label", "value", "children"];
|
|
3
|
+
export var transformDataName = function transformDataName(dataSource, fieldNames) {
|
|
4
|
+
var label = fieldNames.label,
|
|
5
|
+
value = fieldNames.value,
|
|
6
|
+
children = fieldNames.children,
|
|
7
|
+
extraFields = _objectWithoutProperties(fieldNames, _excluded);
|
|
8
|
+
function transformNode(node) {
|
|
9
|
+
var newNode = {
|
|
10
|
+
label: node[label],
|
|
11
|
+
value: node[value]
|
|
12
|
+
};
|
|
13
|
+
// 处理额外的字段
|
|
14
|
+
Object.keys(extraFields).forEach(function (key) {
|
|
15
|
+
newNode[key] = node[extraFields[key]];
|
|
16
|
+
});
|
|
17
|
+
if (children && Array.isArray(node[children])) {
|
|
18
|
+
newNode.children = node[children].map(transformNode);
|
|
19
|
+
}
|
|
20
|
+
return newNode;
|
|
21
|
+
}
|
|
22
|
+
function transformData(data) {
|
|
23
|
+
return data.map(transformNode);
|
|
24
|
+
}
|
|
25
|
+
return transformData(dataSource);
|
|
26
|
+
};
|
|
@@ -21,7 +21,7 @@ var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames",
|
|
|
21
21
|
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
|
22
22
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
23
|
import { SearchOutlined } from '@ant-design/icons';
|
|
24
|
-
import { useMount, useSetState } from 'ahooks';
|
|
24
|
+
import { useDeepCompareEffect, useMount, useSetState } from 'ahooks';
|
|
25
25
|
import { cloneDeep, debounce, isArray, isEqual, isFunction, omit } from 'lodash';
|
|
26
26
|
import { ReactSVG } from 'react-svg';
|
|
27
27
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
|
|
@@ -341,7 +341,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
341
341
|
case 16:
|
|
342
342
|
_context2.prev = 16;
|
|
343
343
|
_context2.t0 = _context2["catch"](0);
|
|
344
|
-
console.
|
|
344
|
+
console.warn('error', _context2.t0);
|
|
345
345
|
case 19:
|
|
346
346
|
case "end":
|
|
347
347
|
return _context2.stop();
|
|
@@ -596,6 +596,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
596
596
|
});
|
|
597
597
|
nextState.selectedRows = value;
|
|
598
598
|
}
|
|
599
|
+
} else if (value) {
|
|
600
|
+
nextState.selectedRowKeys = [value];
|
|
601
|
+
nextState.selectedRows = [_defineProperty({}, valueKey, value[valueKey])];
|
|
599
602
|
}
|
|
600
603
|
setState(nextState);
|
|
601
604
|
}
|
|
@@ -670,9 +673,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
670
673
|
labelInValue: labelInValue,
|
|
671
674
|
dataSource: options,
|
|
672
675
|
scrollFollowParent: false,
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
if (!value && isInit || !(options === null || options === void 0 ? void 0 : options.length)) {
|
|
676
|
+
onFocus: function onFocus() {
|
|
677
|
+
if (useRequest) {
|
|
676
678
|
var _useRequest$options9;
|
|
677
679
|
var queryBean = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options9 = useRequest.options) === null || _useRequest$options9 === void 0 ? void 0 : _useRequest$options9.defaultParams) || {};
|
|
678
680
|
var params = withPagination ? {
|
|
@@ -755,6 +757,11 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
755
757
|
};
|
|
756
758
|
}
|
|
757
759
|
}, [value, isTooltip]);
|
|
760
|
+
useDeepCompareEffect(function () {
|
|
761
|
+
setState({
|
|
762
|
+
options: tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource
|
|
763
|
+
});
|
|
764
|
+
}, [tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource]);
|
|
758
765
|
// 当搜索条件只有一个时,且为输入框,默认设置suffix
|
|
759
766
|
if ((formColumns === null || formColumns === void 0 ? void 0 : formColumns.length) === 1 && (formColumns === null || formColumns === void 0 ? void 0 : (_formColumns$ = formColumns[0]) === null || _formColumns$ === void 0 ? void 0 : _formColumns$.type) === 'Input') {
|
|
760
767
|
var _formColumns$2, _formColumns$3, _formColumns$3$fieldP;
|
|
@@ -800,6 +807,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
800
807
|
form: form,
|
|
801
808
|
columns: formColumns,
|
|
802
809
|
onFinish: handleSearch,
|
|
810
|
+
confirmLoading: loading,
|
|
803
811
|
footer: (formColumns === null || formColumns === void 0 ? void 0 : formColumns.length) > 1
|
|
804
812
|
}), _jsx(ProTable, _objectSpread({
|
|
805
813
|
onRow: function onRow(record) {
|
|
@@ -53,6 +53,20 @@
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
// 新加适用于 readonly false
|
|
57
|
+
.@{ant-prefix}-input-affix-wrapper {
|
|
58
|
+
border-top-right-radius: 0;
|
|
59
|
+
border-bottom-right-radius: 0;
|
|
60
|
+
&.ant-input-affix-wrapper-status-error{
|
|
61
|
+
& + .@{ant-prefix}-btn{
|
|
62
|
+
border: 1px solid var(--ant-error-color);
|
|
63
|
+
>.viewSvg{
|
|
64
|
+
color: var(--ant-error-color);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
56
70
|
.pro-tree-modal-input-appoint {
|
|
57
71
|
.@{ant-prefix}-input {
|
|
58
72
|
border-top-left-radius: 0;
|
|
@@ -93,6 +107,15 @@
|
|
|
93
107
|
fill: #c5c7cd;
|
|
94
108
|
}
|
|
95
109
|
|
|
110
|
+
.@{ant-prefix}-select-status-error {
|
|
111
|
+
& + .@{ant-prefix}-btn{
|
|
112
|
+
border: 1px solid var(--ant-error-color);
|
|
113
|
+
>.viewSvg{
|
|
114
|
+
color: var(--ant-error-color);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
96
119
|
.@{ant-prefix}-input-group-addon {
|
|
97
120
|
padding: 0px var(--zaui-space-size-sm, 8px);
|
|
98
121
|
background-color: var(--zaui-base-bg, #ffffff);
|
|
@@ -12,8 +12,8 @@ export type Props = Omit<RangePickerProps, 'value' | 'onChange' | 'format' | 'se
|
|
|
12
12
|
separator?: any;
|
|
13
13
|
isView?: boolean;
|
|
14
14
|
};
|
|
15
|
-
type Value = [Moment?, Moment?, boolean?];
|
|
16
|
-
type ValueStr = [string?, string?, string?];
|
|
15
|
+
type Value = [Moment?, Moment?, boolean?] | null;
|
|
16
|
+
type ValueStr = [string?, string?, string?] | null;
|
|
17
17
|
type HandleChange = (value: ValueStr | null, valueStr: Value | null) => void;
|
|
18
18
|
declare const ProRangeLimit: React.FC<Props>;
|
|
19
19
|
export default ProRangeLimit;
|
|
@@ -27,12 +27,16 @@ var useControlled = function useControlled(props) {
|
|
|
27
27
|
var _props$value, _props$value2;
|
|
28
28
|
var internalValue = [((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value[0]) && moment(props.value[0], props.format), ((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2[1]) && moment(props.value[1], props.format)];
|
|
29
29
|
var handleChange = function handleChange(value, other) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
if (!value) {
|
|
31
|
+
props === null || props === void 0 ? void 0 : props.onChange(value, other);
|
|
32
|
+
} else {
|
|
33
|
+
var _value = _slicedToArray(value, 2),
|
|
34
|
+
start = _value[0],
|
|
35
|
+
end = _value[1];
|
|
36
|
+
if (props === null || props === void 0 ? void 0 : props.onChange) {
|
|
37
|
+
var valueStr = [start === null || start === void 0 ? void 0 : start.format(props.format), end === null || end === void 0 ? void 0 : end.format(props.format)];
|
|
38
|
+
props === null || props === void 0 ? void 0 : props.onChange(valueStr, value);
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
41
|
};
|
|
38
42
|
return [internalValue, handleChange];
|
|
@@ -96,6 +100,10 @@ var ProRangeLimit = function ProRangeLimit(props) {
|
|
|
96
100
|
}
|
|
97
101
|
// 时间范围change
|
|
98
102
|
var handleRangeChange = function handleRangeChange(date, dateStr) {
|
|
103
|
+
if (!date) {
|
|
104
|
+
onChange(date, dateStr);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
99
107
|
var _ref4 = date || [],
|
|
100
108
|
_ref5 = _slicedToArray(_ref4, 2),
|
|
101
109
|
start = _ref5[0],
|
|
@@ -108,20 +116,19 @@ var ProRangeLimit = function ProRangeLimit(props) {
|
|
|
108
116
|
};
|
|
109
117
|
// 长期选择框change
|
|
110
118
|
var handleForeverChange = function handleForeverChange(e) {
|
|
111
|
-
var _start, _end;
|
|
112
119
|
var foreverStr = e.target.checked ? 'Y' : 'N';
|
|
113
120
|
var _ref8 = value || [],
|
|
114
121
|
_ref9 = _slicedToArray(_ref8, 2),
|
|
115
122
|
start = _ref9[0],
|
|
116
123
|
end = _ref9[1];
|
|
117
124
|
if (e.target.checked) {
|
|
125
|
+
var _start, _end;
|
|
118
126
|
start = start || moment().startOf('day');
|
|
119
127
|
end = foreverMoment;
|
|
128
|
+
onChange([start, end, e.target.checked], [(_start = start) === null || _start === void 0 ? void 0 : _start.format(format), (_end = end) === null || _end === void 0 ? void 0 : _end.format(format), foreverStr]);
|
|
120
129
|
} else {
|
|
121
|
-
|
|
122
|
-
end = undefined;
|
|
130
|
+
onChange(null);
|
|
123
131
|
}
|
|
124
|
-
onChange([start, end, e.target.checked], [(_start = start) === null || _start === void 0 ? void 0 : _start.format(format), (_end = end) === null || _end === void 0 ? void 0 : _end.format(format), foreverStr]);
|
|
125
132
|
};
|
|
126
133
|
return _jsxs(_Input.Group, {
|
|
127
134
|
compact: true,
|
|
@@ -11,8 +11,7 @@ export { default as SwitchCheckbox } from './base/SwitchCheckbox';
|
|
|
11
11
|
export { default as TimePicker } from './base/TimePicker';
|
|
12
12
|
export { default as FormList } from './combination/FormList';
|
|
13
13
|
export { default as ProEditTable } from '../../ProEditTable';
|
|
14
|
-
export { default as ProCascader } from './
|
|
15
|
-
export { default as ProAddressBar } from './combination/ProAddressBar';
|
|
14
|
+
export { default as ProCascader } from './combination/ProCascader';
|
|
16
15
|
export { default as ProCombination } from './combination/ProCombination';
|
|
17
16
|
export { default as ProNumberRange } from './combination/ProNumberRange';
|
|
18
17
|
export { default as ProModalSelect } from './combination/ProModalSelect';
|
|
@@ -12,22 +12,19 @@ export { default as SwitchCheckbox } from './base/SwitchCheckbox';
|
|
|
12
12
|
export { default as TimePicker } from './base/TimePicker';
|
|
13
13
|
export { default as FormList } from './combination/FormList';
|
|
14
14
|
export { default as ProEditTable } from '../../ProEditTable';
|
|
15
|
-
export { default as ProCascader } from './base/ProCascader';
|
|
16
15
|
// combination 组合组件
|
|
17
|
-
export { default as
|
|
16
|
+
export { default as ProCascader } from './combination/ProCascader';
|
|
18
17
|
export { default as ProCombination } from './combination/ProCombination';
|
|
19
18
|
export { default as ProNumberRange } from './combination/ProNumberRange';
|
|
20
19
|
export { default as ProModalSelect } from './combination/ProModalSelect';
|
|
21
20
|
export { default as ProTimeLimit } from './combination/ProTimeLimit';
|
|
22
21
|
export { default as ProRangeLimit } from './combination/ProRangeLimit';
|
|
23
22
|
export { default as Group } from './combination/Group';
|
|
24
|
-
// export { default as GroupCopy } from './combination/GroupCopy';
|
|
25
23
|
export { default as ProCollapse } from './combination/Container';
|
|
26
24
|
export { default as Container } from './combination/Container';
|
|
27
25
|
export { default as ProEnum } from '../../ProEnum';
|
|
28
26
|
export { default as ProSelect } from '../../ProSelect';
|
|
29
27
|
export { default as ProUpload } from '../../ProUpload';
|
|
30
|
-
// export { default as ProTreeSelect } from '../../ProTreeSelect';
|
|
31
28
|
export { default as ProTreeModal } from '../../ProTreeModal';
|
|
32
29
|
export { default as ProTree } from '../../ProTree';
|
|
33
30
|
// footer组件
|
|
@@ -226,7 +226,7 @@ var Render = function Render(props) {
|
|
|
226
226
|
}
|
|
227
227
|
_args[2].option = args[1];
|
|
228
228
|
switch (type) {
|
|
229
|
-
case '
|
|
229
|
+
case 'ProCascader':
|
|
230
230
|
_args[2].selectedOptions = args[1];
|
|
231
231
|
break;
|
|
232
232
|
case 'DatePicker':
|
|
@@ -423,17 +423,21 @@ var Render = function Render(props) {
|
|
|
423
423
|
var formItem = orgFormItem;
|
|
424
424
|
// 当存在shouldUpdate时捕获所有form变更(防止表单onchange设置form值时无法更新的问题)
|
|
425
425
|
if (_otherFormItemProps.shouldUpdate) {
|
|
426
|
-
formItem =
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
children:
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
426
|
+
formItem =
|
|
427
|
+
// 空标签防止气泡不显示
|
|
428
|
+
_jsx(_Fragment, {
|
|
429
|
+
children: _jsx(_Form.Item, {
|
|
430
|
+
shouldUpdate: _otherFormItemProps.shouldUpdate,
|
|
431
|
+
noStyle: true,
|
|
432
|
+
children: function children() {
|
|
433
|
+
return _jsx(_Form.Item, _objectSpread(_objectSpread({}, omit(_otherFormItemProps, filterFormItemKey)), {}, {
|
|
434
|
+
// @ts-ignore
|
|
435
|
+
_internalItemRender: internalItemRender,
|
|
436
|
+
className: _className,
|
|
437
|
+
children: child
|
|
438
|
+
}));
|
|
439
|
+
}
|
|
440
|
+
})
|
|
437
441
|
});
|
|
438
442
|
}
|
|
439
443
|
// 不渲染tooltip
|
|
@@ -449,7 +453,8 @@ var Render = function Render(props) {
|
|
|
449
453
|
});
|
|
450
454
|
return _jsx(_Tooltip, {
|
|
451
455
|
title: title,
|
|
452
|
-
|
|
456
|
+
open: changed ? undefined : false,
|
|
457
|
+
// open={true}
|
|
453
458
|
getPopupContainer: function getPopupContainer(target) {
|
|
454
459
|
return target.parentElement;
|
|
455
460
|
},
|
|
@@ -178,7 +178,9 @@ var RenderFields = function RenderFields(props) {
|
|
|
178
178
|
hiddenNames: column.hiddenNames,
|
|
179
179
|
colProps: _colProps,
|
|
180
180
|
mode: componentProps.mode,
|
|
181
|
-
namePath: column.namePath
|
|
181
|
+
namePath: column.namePath,
|
|
182
|
+
globalControl: globalControl,
|
|
183
|
+
formDisabled: formDisabled
|
|
182
184
|
};
|
|
183
185
|
if (outerClearNotShow !== false && show === false && (column === null || column === void 0 ? void 0 : column.name) && form.getFieldValue(column === null || column === void 0 ? void 0 : column.name)) {
|
|
184
186
|
setTimeout(function () {
|
|
@@ -16,8 +16,7 @@ import { Props as TimePickerProps } from '../base/TimePicker';
|
|
|
16
16
|
import { Props as SwitchProps } from '../base/Switch';
|
|
17
17
|
import { Props as SwitchCheckboxProps } from '../base/SwitchCheckbox';
|
|
18
18
|
import { Props as TextAreaProps } from '../base/TextArea';
|
|
19
|
-
import {
|
|
20
|
-
import { AddressProps } from '../combination/ProAddressBar/propsType';
|
|
19
|
+
import { ProCascaderProps } from '../combination/ProCascader/propsType';
|
|
21
20
|
import { ProCombinationProps } from '../combination/ProCombination/propsType';
|
|
22
21
|
import { ProModalSelectPropsType as ProModalSelectProps } from '../combination/ProModalSelect/propsType';
|
|
23
22
|
import { ProNumberRangeProps } from '../combination/ProNumberRange/propsType';
|
|
@@ -123,8 +122,8 @@ export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
|
|
|
123
122
|
type?: 'TextArea';
|
|
124
123
|
fieldProps?: FieldProps<TextAreaProps, Values, T>;
|
|
125
124
|
} | {
|
|
126
|
-
type?: '
|
|
127
|
-
fieldProps?: FieldProps<
|
|
125
|
+
type?: 'ProCascader';
|
|
126
|
+
fieldProps?: FieldProps<ProCascaderProps, Values, T>;
|
|
128
127
|
} | {
|
|
129
128
|
type?: 'ProCombination';
|
|
130
129
|
fieldProps?: FieldProps<ProCombinationProps, Values, T>;
|
|
@@ -155,9 +154,6 @@ export type ColumnPropsMap<Values = any, T = 'ProForm'> = {
|
|
|
155
154
|
} | {
|
|
156
155
|
type?: 'ProUpload';
|
|
157
156
|
fieldProps?: FieldProps<ProUploadProps, Values, T>;
|
|
158
|
-
} | {
|
|
159
|
-
type?: 'ProCascader';
|
|
160
|
-
fieldProps?: FieldProps<ProCascaderProps<any, any[], any>, Values, T>;
|
|
161
157
|
} | {
|
|
162
158
|
type?: 'ProTree';
|
|
163
159
|
fieldProps?: FieldProps<ProTreeProps, Values, T>;
|
package/es/ProForm/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { DoubleLeftOutlined } from '@ant-design/icons';
|
|
|
18
18
|
import classnames from 'classnames';
|
|
19
19
|
import React, { forwardRef, useImperativeHandle, useMemo } from 'react';
|
|
20
20
|
import { isObject, isString, merge } from 'lodash';
|
|
21
|
-
import { FormFooter, InputRange, ProAddress,
|
|
21
|
+
import { FormFooter, InputRange, ProAddress, ProCascader, ProCertNo, ProCertValidity, ProCombination, ProModalSelect, ProNumberRange, ProRangeBox, ProTimeLimit, transferAddressInfoToRegion, ProUpload, ProTreeModal, ProTree, EnumSelect } from './components';
|
|
22
22
|
import RenderFields from './components/render/RenderFields';
|
|
23
23
|
import { useProConfig, useContextForms } from '../ProConfigProvider';
|
|
24
24
|
import { getLayout, splitNameStr, useControlled, initialValuesToNames } from './utils/index';
|
|
@@ -236,6 +236,10 @@ var ProForm = function ProForm(props, ref) {
|
|
|
236
236
|
onValuesChange: handleValuesChange,
|
|
237
237
|
onFinish: handleFinish,
|
|
238
238
|
initialValues: _initialValues,
|
|
239
|
+
scrollToFirstError: {
|
|
240
|
+
block: 'center',
|
|
241
|
+
behavior: 'smooth'
|
|
242
|
+
},
|
|
239
243
|
children: _jsxs(_Row, _objectSpread(_objectSpread({
|
|
240
244
|
gutter: 24
|
|
241
245
|
}, rowProps), {}, {
|
|
@@ -313,7 +317,7 @@ ProFormForward.Provider = ProFormProvider; // 包装Provider
|
|
|
313
317
|
ProFormForward.useFieldProps = useFieldProps; // 获取每个字段的其他参数 -otherProps
|
|
314
318
|
ProFormForward.useContextForms = useContextForms; // 获取 ProConfigProvider中的表单实例map
|
|
315
319
|
// 内置组合
|
|
316
|
-
ProFormForward.
|
|
320
|
+
ProFormForward.ProCascader = ProCascader;
|
|
317
321
|
ProFormForward.ProCombination = ProCombination;
|
|
318
322
|
ProFormForward.ProNumberRange = ProNumberRange;
|
|
319
323
|
ProFormForward.ProModalSelect = ProModalSelect;
|