@teamias/rex-design 0.0.26 → 0.0.28
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/components/base-form/components/ProFormDateRangePickerV2.js +46 -20
- package/dist/components/base-form/components/ProFormDigitRangeV2.js +99 -87
- package/dist/components/base-form/components/ResetView.d.ts +5 -0
- package/dist/components/base-form/components/ResetView.js +15 -0
- package/dist/components/base-form/{base-form.d.ts → core/base-form.d.ts} +1 -1
- package/dist/components/base-form/{base-form.js → core/base-form.js} +4 -4
- package/dist/components/base-form/core/descriptions-model.d.ts +3 -0
- package/dist/components/base-form/core/descriptions-model.js +86 -0
- package/dist/components/base-form/core/index.d.ts +4 -0
- package/dist/components/base-form/core/index.js +16 -0
- package/dist/components/base-form/demo/{index.js → Base.js} +1 -1
- package/dist/components/base-form/demo/BaseFormBasicDepend.js +1 -1
- package/dist/components/base-form/demo/BaseFormBasicTest.js +1 -1
- package/dist/components/base-form/demo/BaseFormCustomContent.js +1 -1
- package/dist/components/base-form/demo/BaseFormCustomFormItem.d.ts +2 -0
- package/dist/components/base-form/demo/BaseFormCustomFormItem.js +63 -0
- package/dist/components/base-form/demo/BaseFormDescriptions.d.ts +2 -0
- package/dist/components/base-form/demo/BaseFormDescriptions.js +244 -0
- package/dist/components/base-form/demo/BaseProFormDateRangePickerV2.js +5 -5
- package/dist/components/base-form/demo/BaseProFormDigitRangeV2.js +7 -6
- package/dist/components/base-form/index.d.ts +1 -1
- package/dist/components/base-form/index.js +1 -1
- package/dist/components/base-form/modules/dependencyUtils.d.ts +2 -2
- package/dist/components/base-form/modules/renderComponentNode.js +1 -1
- package/dist/components/base-form/style/index.d.ts +1 -1
- package/dist/components/base-form/style/index.js +5 -2
- package/dist/components/base-form/types/base-form.d.ts +30 -0
- package/dist/components/base-form/{types.d.ts → types/field-type.d.ts} +21 -41
- package/dist/components/base-form/types/field-type.js +1 -0
- package/dist/components/base-form/types/index.d.ts +3 -0
- package/dist/components/base-form/types/index.js +3 -0
- package/dist/components/base-form/types/value-type.d.ts +9 -0
- package/dist/components/base-form/types/value-type.js +1 -0
- package/package.json +1 -1
- /package/dist/components/base-form/demo/{index.d.ts → Base.d.ts} +0 -0
- /package/dist/components/base-form/{types.js → types/base-form.js} +0 -0
|
@@ -19,7 +19,9 @@ import { DatePicker, Form } from 'antd';
|
|
|
19
19
|
import dayjs from 'dayjs';
|
|
20
20
|
import { get } from 'radash';
|
|
21
21
|
import { useContext, useMemo, useState } from 'react';
|
|
22
|
+
import { ResetView } from "./ResetView";
|
|
22
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
25
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
26
|
export var ProFormDateRangePickerV2 = function ProFormDateRangePickerV2(_ref) {
|
|
25
27
|
var name = _ref.name,
|
|
@@ -95,17 +97,29 @@ export var ProFormDateRangePickerV2 = function ProFormDateRangePickerV2(_ref) {
|
|
|
95
97
|
startValue = form.getFieldValue(startFieldName);
|
|
96
98
|
endValue = form.getFieldValue(endFieldName);
|
|
97
99
|
if (!(!startValue || !endValue)) {
|
|
98
|
-
_context.next =
|
|
100
|
+
_context.next = 7;
|
|
99
101
|
break;
|
|
100
102
|
}
|
|
101
103
|
setValidateStatus('error');
|
|
102
104
|
setHelp(!startValue && !endValue ? "\u8BF7\u9009\u62E9".concat(label || '') : '');
|
|
105
|
+
form.setFields([{
|
|
106
|
+
name: startFieldName,
|
|
107
|
+
errors: !startValue ? ["\u8BF7\u9009\u62E9".concat(label || '')] : []
|
|
108
|
+
}, {
|
|
109
|
+
name: endFieldName,
|
|
110
|
+
errors: !endValue ? ["\u8BF7\u9009\u62E9".concat(label || '')] : []
|
|
111
|
+
}]);
|
|
103
112
|
return _context.abrupt("return", Promise.reject(new Error("\u8BF7\u9009\u62E9".concat(label || ''))));
|
|
104
|
-
case
|
|
113
|
+
case 7:
|
|
105
114
|
setValidateStatus('');
|
|
106
115
|
setHelp('');
|
|
116
|
+
form.setFields([{
|
|
117
|
+
name: startFieldName
|
|
118
|
+
}, {
|
|
119
|
+
name: endFieldName
|
|
120
|
+
}]);
|
|
107
121
|
return _context.abrupt("return", Promise.resolve());
|
|
108
|
-
case
|
|
122
|
+
case 11:
|
|
109
123
|
case "end":
|
|
110
124
|
return _context.stop();
|
|
111
125
|
}
|
|
@@ -153,23 +167,35 @@ export var ProFormDateRangePickerV2 = function ProFormDateRangePickerV2(_ref) {
|
|
|
153
167
|
children: startValue && endValue ? "".concat(startValue, " ~ ").concat(endValue) : '-'
|
|
154
168
|
});
|
|
155
169
|
}
|
|
156
|
-
return /*#__PURE__*/
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
170
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
171
|
+
children: [/*#__PURE__*/_jsx(ResetView, {
|
|
172
|
+
data: data,
|
|
173
|
+
onReset: function onReset() {
|
|
174
|
+
if (!form.getFieldsError([startFieldName, endFieldName]).map(function (ii) {
|
|
175
|
+
return ii.errors;
|
|
176
|
+
}).flat().length && validateStatus !== '') {
|
|
177
|
+
setValidateStatus('');
|
|
178
|
+
setHelp('');
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}), /*#__PURE__*/_jsx(DatePicker.RangePicker, _objectSpread(_objectSpread({
|
|
182
|
+
placeholder: placeholder,
|
|
183
|
+
format: dataFormat,
|
|
184
|
+
allowClear: allowClear
|
|
185
|
+
}, fieldProps), {}, {
|
|
186
|
+
style: _objectSpread({
|
|
187
|
+
width: '100%'
|
|
188
|
+
}, fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.style),
|
|
189
|
+
value: startValue && endValue ? [dayjs(startValue), dayjs(endValue)] : undefined,
|
|
190
|
+
onChange: function onChange(dates, dateStrings) {
|
|
191
|
+
form.setFieldValue(startFieldName, dateStrings[0] || undefined);
|
|
192
|
+
form.setFieldValue(endFieldName, dateStrings[1] || undefined);
|
|
193
|
+
setTimeout(function () {
|
|
194
|
+
validateRules === null || validateRules === void 0 || validateRules[0].validator().catch(function () {});
|
|
195
|
+
}, 0);
|
|
196
|
+
}
|
|
197
|
+
}))]
|
|
198
|
+
});
|
|
173
199
|
}
|
|
174
200
|
})]
|
|
175
201
|
}));
|
|
@@ -13,11 +13,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
13
13
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
14
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
import { ProForm } from '@ant-design/pro-components';
|
|
16
|
+
import { ProForm, ProFormDependency } from '@ant-design/pro-components';
|
|
17
17
|
import { EditOrReadOnlyContext } from '@ant-design/pro-form/es/BaseForm/EditOrReadOnlyContext';
|
|
18
18
|
import { Form, Input, InputNumber, Space } from 'antd';
|
|
19
|
-
import { useCallback, useContext, useMemo } from 'react';
|
|
19
|
+
import { useCallback, useContext, useMemo, useState } from 'react';
|
|
20
20
|
import { RenderText } from "./RenderText";
|
|
21
|
+
import { ResetView } from "./ResetView";
|
|
21
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
24
|
export var ProFormDigitRangeV2 = function ProFormDigitRangeV2(_ref) {
|
|
@@ -37,6 +38,16 @@ export var ProFormDigitRangeV2 = function ProFormDigitRangeV2(_ref) {
|
|
|
37
38
|
var context = useContext(EditOrReadOnlyContext);
|
|
38
39
|
var formReadonly = context.mode === 'read';
|
|
39
40
|
|
|
41
|
+
// 校验状态
|
|
42
|
+
var _useState = useState(''),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
validateStatus = _useState2[0],
|
|
45
|
+
setValidateStatus = _useState2[1];
|
|
46
|
+
var _useState3 = useState(''),
|
|
47
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
|
+
help = _useState4[0],
|
|
49
|
+
setHelp = _useState4[1];
|
|
50
|
+
|
|
40
51
|
// 获取字段名
|
|
41
52
|
var _useMemo = useMemo(function () {
|
|
42
53
|
return name || [undefined, undefined];
|
|
@@ -46,84 +57,56 @@ export var ProFormDigitRangeV2 = function ProFormDigitRangeV2(_ref) {
|
|
|
46
57
|
maxFieldName = _useMemo2[1];
|
|
47
58
|
|
|
48
59
|
// 生成校验规则
|
|
49
|
-
var
|
|
50
|
-
if (!required) return undefined;
|
|
51
|
-
if (requiredMode === 'both') {
|
|
52
|
-
// 两边都必填
|
|
53
|
-
return [{
|
|
54
|
-
required: true,
|
|
55
|
-
message: '请输入最小值'
|
|
56
|
-
}];
|
|
57
|
-
} else {
|
|
58
|
-
// 至少填一边
|
|
59
|
-
return [{
|
|
60
|
-
validator: function () {
|
|
61
|
-
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_, value) {
|
|
62
|
-
var maxValue;
|
|
63
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
64
|
-
while (1) switch (_context.prev = _context.next) {
|
|
65
|
-
case 0:
|
|
66
|
-
maxValue = form.getFieldValue(maxFieldName);
|
|
67
|
-
if (!((value === null || value === undefined || value === '') && (maxValue === null || maxValue === undefined || maxValue === ''))) {
|
|
68
|
-
_context.next = 3;
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
return _context.abrupt("return", Promise.reject(new Error('请至少输入一个值')));
|
|
72
|
-
case 3:
|
|
73
|
-
return _context.abrupt("return", Promise.resolve());
|
|
74
|
-
case 4:
|
|
75
|
-
case "end":
|
|
76
|
-
return _context.stop();
|
|
77
|
-
}
|
|
78
|
-
}, _callee);
|
|
79
|
-
}));
|
|
80
|
-
function validator(_x, _x2) {
|
|
81
|
-
return _validator.apply(this, arguments);
|
|
82
|
-
}
|
|
83
|
-
return validator;
|
|
84
|
-
}()
|
|
85
|
-
}];
|
|
86
|
-
}
|
|
87
|
-
}, [required, requiredMode, maxFieldName, form]);
|
|
88
|
-
var maxRules = useMemo(function () {
|
|
60
|
+
var validateRules = useMemo(function () {
|
|
89
61
|
if (!required) return undefined;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
62
|
+
return [{
|
|
63
|
+
validator: function () {
|
|
64
|
+
var _validator = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
65
|
+
var minValue, maxValue;
|
|
66
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
67
|
+
while (1) switch (_context.prev = _context.next) {
|
|
68
|
+
case 0:
|
|
69
|
+
minValue = form.getFieldValue(minFieldName);
|
|
70
|
+
maxValue = form.getFieldValue(maxFieldName);
|
|
71
|
+
if (!(requiredMode === 'both')) {
|
|
72
|
+
_context.next = 9;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
if (!(minValue === null || minValue === undefined || minValue === '' || maxValue === null || maxValue === undefined || maxValue === '')) {
|
|
76
|
+
_context.next = 7;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
setValidateStatus('error');
|
|
80
|
+
setHelp((minValue === null || minValue === undefined || minValue === '') && (maxValue === null || maxValue === undefined || maxValue === '') ? "\u8BF7\u8F93\u5165".concat(label || '数值范围') : minValue === null || minValue === undefined || minValue === '' ? '请输入最小值' : '请输入最大值');
|
|
81
|
+
return _context.abrupt("return", Promise.reject(new Error("\u8BF7\u8F93\u5165".concat(label || '数值范围'))));
|
|
82
|
+
case 7:
|
|
83
|
+
_context.next = 13;
|
|
84
|
+
break;
|
|
85
|
+
case 9:
|
|
86
|
+
if (!((minValue === null || minValue === undefined || minValue === '') && (maxValue === null || maxValue === undefined || maxValue === ''))) {
|
|
87
|
+
_context.next = 13;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
setValidateStatus('error');
|
|
91
|
+
setHelp('请至少输入一个值');
|
|
92
|
+
return _context.abrupt("return", Promise.reject(new Error('请至少输入一个值')));
|
|
93
|
+
case 13:
|
|
94
|
+
setValidateStatus('');
|
|
95
|
+
setHelp('');
|
|
96
|
+
return _context.abrupt("return", Promise.resolve());
|
|
97
|
+
case 16:
|
|
98
|
+
case "end":
|
|
99
|
+
return _context.stop();
|
|
100
|
+
}
|
|
101
|
+
}, _callee);
|
|
102
|
+
}));
|
|
103
|
+
function validator() {
|
|
104
|
+
return _validator.apply(this, arguments);
|
|
105
|
+
}
|
|
106
|
+
return validator;
|
|
107
|
+
}()
|
|
108
|
+
}];
|
|
109
|
+
}, [required, requiredMode, minFieldName, maxFieldName, form, label]);
|
|
127
110
|
|
|
128
111
|
// 处理最小值失去焦点
|
|
129
112
|
var handleMinBlur = useCallback(function () {
|
|
@@ -156,11 +139,28 @@ export var ProFormDigitRangeV2 = function ProFormDigitRangeV2(_ref) {
|
|
|
156
139
|
}
|
|
157
140
|
}, 0);
|
|
158
141
|
}, [autoSwap, minFieldName, maxFieldName, form]);
|
|
159
|
-
return /*#__PURE__*/
|
|
142
|
+
return /*#__PURE__*/_jsxs(Form.Item, _objectSpread(_objectSpread({
|
|
160
143
|
label: label,
|
|
161
|
-
required: required
|
|
144
|
+
required: required,
|
|
145
|
+
validateStatus: validateStatus,
|
|
146
|
+
help: help
|
|
162
147
|
}, formItemProps), {}, {
|
|
163
|
-
children: /*#__PURE__*/
|
|
148
|
+
children: [/*#__PURE__*/_jsx(ProFormDependency, {
|
|
149
|
+
name: [minFieldName, maxFieldName],
|
|
150
|
+
children: function children(data) {
|
|
151
|
+
return /*#__PURE__*/_jsx(ResetView, {
|
|
152
|
+
data: data,
|
|
153
|
+
onReset: function onReset() {
|
|
154
|
+
if (!form.getFieldsError([minFieldName, maxFieldName]).map(function (ii) {
|
|
155
|
+
return ii.errors;
|
|
156
|
+
}).flat().length && validateStatus !== '') {
|
|
157
|
+
setValidateStatus('');
|
|
158
|
+
setHelp('');
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}), /*#__PURE__*/_jsxs(Space.Compact, {
|
|
164
164
|
style: {
|
|
165
165
|
width: '100%'
|
|
166
166
|
},
|
|
@@ -168,7 +168,8 @@ export var ProFormDigitRangeV2 = function ProFormDigitRangeV2(_ref) {
|
|
|
168
168
|
noStyle: true,
|
|
169
169
|
name: minFieldName,
|
|
170
170
|
initialValue: initialValue === null || initialValue === void 0 ? void 0 : initialValue[0],
|
|
171
|
-
rules:
|
|
171
|
+
rules: validateRules,
|
|
172
|
+
validateStatus: validateStatus,
|
|
172
173
|
children: formReadonly ? /*#__PURE__*/_jsx(RenderText, {}) : /*#__PURE__*/_jsx(InputNumber, _objectSpread(_objectSpread({
|
|
173
174
|
placeholder: (placeholder === null || placeholder === void 0 ? void 0 : placeholder[0]) || '最小值',
|
|
174
175
|
precision: precision,
|
|
@@ -177,7 +178,12 @@ export var ProFormDigitRangeV2 = function ProFormDigitRangeV2(_ref) {
|
|
|
177
178
|
style: _objectSpread({
|
|
178
179
|
flex: 1
|
|
179
180
|
}, fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.style),
|
|
180
|
-
onBlur: handleMinBlur
|
|
181
|
+
onBlur: handleMinBlur,
|
|
182
|
+
onChange: function onChange() {
|
|
183
|
+
setTimeout(function () {
|
|
184
|
+
validateRules === null || validateRules === void 0 || validateRules[0].validator().catch(function () {});
|
|
185
|
+
}, 0);
|
|
186
|
+
}
|
|
181
187
|
}))
|
|
182
188
|
}), formReadonly ? /*#__PURE__*/_jsx(RenderText, {
|
|
183
189
|
value: "~",
|
|
@@ -199,7 +205,8 @@ export var ProFormDigitRangeV2 = function ProFormDigitRangeV2(_ref) {
|
|
|
199
205
|
noStyle: true,
|
|
200
206
|
name: maxFieldName,
|
|
201
207
|
initialValue: initialValue === null || initialValue === void 0 ? void 0 : initialValue[1],
|
|
202
|
-
rules:
|
|
208
|
+
rules: validateRules,
|
|
209
|
+
validateStatus: validateStatus,
|
|
203
210
|
children: formReadonly ? /*#__PURE__*/_jsx(RenderText, {}) : /*#__PURE__*/_jsx(InputNumber, _objectSpread(_objectSpread({
|
|
204
211
|
placeholder: (placeholder === null || placeholder === void 0 ? void 0 : placeholder[1]) || '最大值',
|
|
205
212
|
precision: precision,
|
|
@@ -208,9 +215,14 @@ export var ProFormDigitRangeV2 = function ProFormDigitRangeV2(_ref) {
|
|
|
208
215
|
style: _objectSpread({
|
|
209
216
|
flex: 1
|
|
210
217
|
}, fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.style),
|
|
211
|
-
onBlur: handleMaxBlur
|
|
218
|
+
onBlur: handleMaxBlur,
|
|
219
|
+
onChange: function onChange() {
|
|
220
|
+
setTimeout(function () {
|
|
221
|
+
validateRules === null || validateRules === void 0 || validateRules[0].validator().catch(function () {});
|
|
222
|
+
}, 0);
|
|
223
|
+
}
|
|
212
224
|
}))
|
|
213
225
|
})]
|
|
214
|
-
})
|
|
226
|
+
})]
|
|
215
227
|
}));
|
|
216
228
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useDebounceEffect } from 'ahooks';
|
|
2
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export var ResetView = function ResetView(_ref) {
|
|
5
|
+
var data = _ref.data,
|
|
6
|
+
onReset = _ref.onReset;
|
|
7
|
+
useDebounceEffect(function () {
|
|
8
|
+
onReset();
|
|
9
|
+
}, [data], {
|
|
10
|
+
wait: 0,
|
|
11
|
+
trailing: true,
|
|
12
|
+
leading: false
|
|
13
|
+
});
|
|
14
|
+
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
15
|
+
};
|
|
@@ -11,11 +11,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
11
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
12
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
13
13
|
import { ProForm, ProFormDependency } from '@ant-design/pro-components';
|
|
14
|
-
import { handlerFilter, useRexProConfigProvider } from "
|
|
14
|
+
import { handlerFilter, useRexProConfigProvider } from "../../..";
|
|
15
15
|
import { useRef } from 'react';
|
|
16
|
-
import { processDependencyFields } from "
|
|
17
|
-
import { renderComponentNode } from "
|
|
18
|
-
import { BaseFormStyle } from "
|
|
16
|
+
import { processDependencyFields } from "../modules/dependencyUtils";
|
|
17
|
+
import { renderComponentNode } from "../modules/renderComponentNode";
|
|
18
|
+
import { BaseFormStyle } from "../style";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["descriptionsProps", "fields"],
|
|
3
|
+
_excluded2 = ["label", "tooltip", "formItemProps"];
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import { Descriptions, Form } from 'antd';
|
|
12
|
+
import { useMemo } from 'react';
|
|
13
|
+
import { DescriptionsStyle } from "../style";
|
|
14
|
+
import { BaseForm } from "./base-form";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
export var DescriptionsModel = function DescriptionsModel(_ref) {
|
|
17
|
+
var descriptionsProps = _ref.descriptionsProps,
|
|
18
|
+
fields = _ref.fields,
|
|
19
|
+
baseFormProps = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var descriptionsItems = useMemo(function () {
|
|
21
|
+
/** 检查field或其subItems是否包含rules */
|
|
22
|
+
var hasRules = function hasRules(field) {
|
|
23
|
+
if (field.rules && field.rules.length > 0) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
if ('subItems' in field && field.subItems && Array.isArray(field.subItems)) {
|
|
27
|
+
return field.subItems.some(hasRules);
|
|
28
|
+
}
|
|
29
|
+
if (field.required) return true;
|
|
30
|
+
return false;
|
|
31
|
+
};
|
|
32
|
+
return (fields === null || fields === void 0 ? void 0 : fields.map(function (field) {
|
|
33
|
+
var _formItemProps$labelC;
|
|
34
|
+
var isRequired = hasRules(field);
|
|
35
|
+
|
|
36
|
+
// 创建新的field对象,移除label属性
|
|
37
|
+
var label = field.label,
|
|
38
|
+
tooltip = field.tooltip,
|
|
39
|
+
formItemProps = field.formItemProps,
|
|
40
|
+
otherData = _objectWithoutProperties(field, _excluded2);
|
|
41
|
+
return {
|
|
42
|
+
label: /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({
|
|
43
|
+
label: label,
|
|
44
|
+
tooltip: tooltip,
|
|
45
|
+
required: isRequired,
|
|
46
|
+
colon: false,
|
|
47
|
+
style: {
|
|
48
|
+
margin: 0
|
|
49
|
+
}
|
|
50
|
+
}, formItemProps), {}, {
|
|
51
|
+
labelCol: _objectSpread(_objectSpread({}, formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.labelCol), {}, {
|
|
52
|
+
style: _objectSpread({
|
|
53
|
+
padding: 0,
|
|
54
|
+
width: '100%',
|
|
55
|
+
textAlign: 'right'
|
|
56
|
+
}, formItemProps === null || formItemProps === void 0 || (_formItemProps$labelC = formItemProps.labelCol) === null || _formItemProps$labelC === void 0 ? void 0 : _formItemProps$labelC.style)
|
|
57
|
+
}),
|
|
58
|
+
wrapperCol: {
|
|
59
|
+
style: {
|
|
60
|
+
display: 'none'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
})),
|
|
64
|
+
children: /*#__PURE__*/_jsx(BaseForm, _objectSpread(_objectSpread({}, baseFormProps), {}, {
|
|
65
|
+
itemMarginBottom: 0,
|
|
66
|
+
fields: [_objectSpread(_objectSpread({}, otherData), {}, {
|
|
67
|
+
formItemProps: {
|
|
68
|
+
wrapperCol: formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.wrapperCol
|
|
69
|
+
}
|
|
70
|
+
})]
|
|
71
|
+
})),
|
|
72
|
+
span: field.span || 1
|
|
73
|
+
};
|
|
74
|
+
})) || [];
|
|
75
|
+
}, [fields]);
|
|
76
|
+
return /*#__PURE__*/_jsx(DescriptionsStyle, {
|
|
77
|
+
children: /*#__PURE__*/_jsx(Descriptions, _objectSpread(_objectSpread({
|
|
78
|
+
bordered: true,
|
|
79
|
+
styles: {
|
|
80
|
+
label: {}
|
|
81
|
+
}
|
|
82
|
+
}, descriptionsProps), {}, {
|
|
83
|
+
items: descriptionsItems
|
|
84
|
+
}))
|
|
85
|
+
});
|
|
86
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import { BaseForm as RawBaseForm } from "./base-form";
|
|
8
|
+
import { DescriptionsModel as BaseDescriptionsForm } from "./descriptions-model";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
var BaseForm = function BaseForm(props) {
|
|
11
|
+
if (props.type === 'descriptions') {
|
|
12
|
+
return /*#__PURE__*/_jsx(BaseDescriptionsForm, _objectSpread({}, props));
|
|
13
|
+
}
|
|
14
|
+
return /*#__PURE__*/_jsx(RawBaseForm, _objectSpread({}, props));
|
|
15
|
+
};
|
|
16
|
+
export { BaseDescriptionsForm, BaseForm };
|
|
@@ -10,7 +10,7 @@ import { ProForm } from '@ant-design/pro-components';
|
|
|
10
10
|
import { RexProConfigProvider } from "../../..";
|
|
11
11
|
import { crush } from 'radash';
|
|
12
12
|
import { createIntl } from 'react-intl';
|
|
13
|
-
import { BaseForm } from "../
|
|
13
|
+
import { BaseForm } from "../core";
|
|
14
14
|
import { getFieldsDefaultValues } from "../modules/handlerData";
|
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
16
|
export default (function () {
|
|
@@ -12,7 +12,7 @@ import { ProForm } from '@ant-design/pro-components';
|
|
|
12
12
|
import { RexProConfigProvider } from "../../..";
|
|
13
13
|
import { crush } from 'radash';
|
|
14
14
|
import { createIntl } from 'react-intl';
|
|
15
|
-
import { BaseForm } from "../
|
|
15
|
+
import { BaseForm } from "../core";
|
|
16
16
|
import { getFieldsDefaultValues } from "../modules/handlerData";
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
18
|
var s1 = function s1(params) {
|
|
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import { ProForm, ProFormDependency, ProFormSelect } from '@ant-design/pro-components';
|
|
17
17
|
import { Button, Card } from 'antd';
|
|
18
|
-
import { BaseForm } from "../
|
|
18
|
+
import { BaseForm } from "../core";
|
|
19
19
|
import { dataToInitialValues } from "../modules/handlerData";
|
|
20
20
|
import { valuesToFields } from "../modules/valuesToFields";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -9,7 +9,7 @@ import { ProForm } from '@ant-design/pro-components';
|
|
|
9
9
|
import { RexProConfigProvider, useStateData } from "../../..";
|
|
10
10
|
import { crush } from 'radash';
|
|
11
11
|
import { createIntl } from 'react-intl';
|
|
12
|
-
import { BaseForm } from "../
|
|
12
|
+
import { BaseForm } from "../core";
|
|
13
13
|
import { getFieldsDefaultValues } from "../modules/handlerData";
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import enUS from "../../../locales/en-US.json";
|
|
8
|
+
import { ProForm } from '@ant-design/pro-components';
|
|
9
|
+
import { RexProConfigProvider } from "../../..";
|
|
10
|
+
import { Input } from 'antd';
|
|
11
|
+
import { crush } from 'radash';
|
|
12
|
+
import { createIntl } from 'react-intl';
|
|
13
|
+
import { BaseForm } from "../core";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
|
+
export default (function () {
|
|
17
|
+
return /*#__PURE__*/_jsx(RexProConfigProvider, {
|
|
18
|
+
value: {
|
|
19
|
+
intl: createIntl({
|
|
20
|
+
locale: 'en-US',
|
|
21
|
+
messages: _objectSpread({}, crush(enUS))
|
|
22
|
+
})
|
|
23
|
+
},
|
|
24
|
+
children: /*#__PURE__*/_jsx(ProForm, {
|
|
25
|
+
initialValues: {
|
|
26
|
+
a: 1
|
|
27
|
+
},
|
|
28
|
+
onFinish: function onFinish(values) {
|
|
29
|
+
console.log(values);
|
|
30
|
+
},
|
|
31
|
+
children: /*#__PURE__*/_jsx(BaseForm, {
|
|
32
|
+
fields: [{
|
|
33
|
+
valueType: 'input',
|
|
34
|
+
label: '普通输入框',
|
|
35
|
+
field: 'a',
|
|
36
|
+
readonly: true
|
|
37
|
+
}, {
|
|
38
|
+
field: 'customFormItem',
|
|
39
|
+
label: '自定义渲染表单项',
|
|
40
|
+
valueType: 'custom',
|
|
41
|
+
required: true,
|
|
42
|
+
formItemProps: {
|
|
43
|
+
rules: [{
|
|
44
|
+
required: true,
|
|
45
|
+
message: '这是必填项'
|
|
46
|
+
}]
|
|
47
|
+
},
|
|
48
|
+
render: function render(props, form) {
|
|
49
|
+
// console.log(props);
|
|
50
|
+
|
|
51
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
52
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
53
|
+
value: props.value,
|
|
54
|
+
onChange: props.onChange
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}],
|
|
59
|
+
itemWidth: "50%"
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import enUS from "../../../locales/en-US.json";
|
|
8
|
+
import { UserOutlined } from '@ant-design/icons';
|
|
9
|
+
import { ProForm } from '@ant-design/pro-components';
|
|
10
|
+
import { RexProConfigProvider } from "../../..";
|
|
11
|
+
import { crush } from 'radash';
|
|
12
|
+
import { createIntl } from 'react-intl';
|
|
13
|
+
import { BaseForm } from "../core";
|
|
14
|
+
import { getFieldsDefaultValues } from "../modules/handlerData";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
export default (function () {
|
|
17
|
+
var fields = [{
|
|
18
|
+
label: '成本区间',
|
|
19
|
+
valueType: 'multipleComponents',
|
|
20
|
+
compact: true,
|
|
21
|
+
subItems: [{
|
|
22
|
+
valueType: 'select',
|
|
23
|
+
field: 'avg_cost',
|
|
24
|
+
defaultValue: 'avg_cost',
|
|
25
|
+
itemWidth: '150px',
|
|
26
|
+
fieldProps: {
|
|
27
|
+
allowClear: false,
|
|
28
|
+
popupMatchSelectWidth: false,
|
|
29
|
+
maxTagCount: 1
|
|
30
|
+
},
|
|
31
|
+
hidden: false,
|
|
32
|
+
options: [{
|
|
33
|
+
label: '成本区间',
|
|
34
|
+
value: 'avg_cost'
|
|
35
|
+
}]
|
|
36
|
+
}, {
|
|
37
|
+
field: ['avg_cost_min', 'avg_cost_max'],
|
|
38
|
+
valueType: 'inputNumberRangeV2'
|
|
39
|
+
}],
|
|
40
|
+
hidden: false
|
|
41
|
+
}, {
|
|
42
|
+
valueType: 'multipleComponents',
|
|
43
|
+
label: 'multipleComponents',
|
|
44
|
+
compact: true,
|
|
45
|
+
tooltip: 'multipleComponents 示例',
|
|
46
|
+
subItems: [{
|
|
47
|
+
valueType: 'input',
|
|
48
|
+
field: 'multipleComponents-input',
|
|
49
|
+
labelWidth: '100px',
|
|
50
|
+
// itemWidth: '20%',
|
|
51
|
+
defaultValue: '2025-05-05',
|
|
52
|
+
fieldProps: {
|
|
53
|
+
prefix: /*#__PURE__*/_jsx(UserOutlined, {}),
|
|
54
|
+
disabled: true
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
valueType: 'treeSelect',
|
|
58
|
+
field: 'multipleComponents-treeSelect',
|
|
59
|
+
// itemWidth: '80%',
|
|
60
|
+
defaultValue: 'light',
|
|
61
|
+
options: [{
|
|
62
|
+
label: 'Light',
|
|
63
|
+
value: 'light'
|
|
64
|
+
}, {
|
|
65
|
+
label: 'Light2',
|
|
66
|
+
value: 'light2'
|
|
67
|
+
}]
|
|
68
|
+
}, {
|
|
69
|
+
valueType: 'datePicker',
|
|
70
|
+
field: 'multipleComponents-datePicker',
|
|
71
|
+
defaultValue: '2025-05-05'
|
|
72
|
+
}, {
|
|
73
|
+
valueType: 'treeSelect',
|
|
74
|
+
field: 'multipleComponents-treeSelect2',
|
|
75
|
+
options: [{
|
|
76
|
+
label: 'Light123',
|
|
77
|
+
value: 'light123'
|
|
78
|
+
}, {
|
|
79
|
+
label: 'Light456',
|
|
80
|
+
value: 'light456'
|
|
81
|
+
}],
|
|
82
|
+
fieldProps: {
|
|
83
|
+
disabled: true
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// {
|
|
87
|
+
// valueType: 'inputNumberRange',
|
|
88
|
+
// field: ['multipleComponents-min', 'multipleComponents-max'],
|
|
89
|
+
// defaultValue: [2, 5],
|
|
90
|
+
// },
|
|
91
|
+
// {
|
|
92
|
+
// valueType: 'select',
|
|
93
|
+
// field: 'multipleComponents-select',
|
|
94
|
+
// defaultValue: 'light',
|
|
95
|
+
// options: [
|
|
96
|
+
// {label: 'Light', value: 'light'},
|
|
97
|
+
// {label: 'Light2', value: 'light2'},
|
|
98
|
+
// ],
|
|
99
|
+
// },
|
|
100
|
+
// {
|
|
101
|
+
// valueType: 'dateRange',
|
|
102
|
+
// field: ['multipleComponents-start', 'multipleComponents-end'],
|
|
103
|
+
// },
|
|
104
|
+
],
|
|
105
|
+
span: 3
|
|
106
|
+
}, {
|
|
107
|
+
valueType: 'input',
|
|
108
|
+
field: 'input',
|
|
109
|
+
label: 'input',
|
|
110
|
+
defaultValue: 'input',
|
|
111
|
+
hidden: false,
|
|
112
|
+
rules: [{
|
|
113
|
+
required: true,
|
|
114
|
+
message: '这是必填项'
|
|
115
|
+
}]
|
|
116
|
+
}, {
|
|
117
|
+
valueType: 'select',
|
|
118
|
+
field: 'select',
|
|
119
|
+
label: 'select',
|
|
120
|
+
defaultValue: 'light',
|
|
121
|
+
options: [{
|
|
122
|
+
label: 'Light',
|
|
123
|
+
value: 'light'
|
|
124
|
+
}, {
|
|
125
|
+
label: 'Light2',
|
|
126
|
+
value: 'light2'
|
|
127
|
+
}]
|
|
128
|
+
}, {
|
|
129
|
+
valueType: 'selectDim',
|
|
130
|
+
field: 'selectDim',
|
|
131
|
+
label: 'selectDim',
|
|
132
|
+
api: '/selectData',
|
|
133
|
+
defaultParams: {
|
|
134
|
+
a: 1,
|
|
135
|
+
b: 2
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
valueType: 'dateRangeV2',
|
|
139
|
+
field: ['dateRange-start', 'dateRange-end'],
|
|
140
|
+
label: 'dateRange',
|
|
141
|
+
defaultValue: -29,
|
|
142
|
+
required: true,
|
|
143
|
+
fieldProps: {
|
|
144
|
+
showTime: true,
|
|
145
|
+
format: 'YYYY/MM/DD HH:mm:ss'
|
|
146
|
+
}
|
|
147
|
+
}, {
|
|
148
|
+
valueType: 'cascader',
|
|
149
|
+
field: 'cascader',
|
|
150
|
+
label: 'cascader',
|
|
151
|
+
options: [{
|
|
152
|
+
label: 'Light',
|
|
153
|
+
value: 'light'
|
|
154
|
+
}, {
|
|
155
|
+
label: 'Light2',
|
|
156
|
+
value: 'light2'
|
|
157
|
+
}]
|
|
158
|
+
}, {
|
|
159
|
+
valueType: 'treeSelect',
|
|
160
|
+
field: 'treeSelect',
|
|
161
|
+
label: 'treeSelect',
|
|
162
|
+
options: [{
|
|
163
|
+
label: 'Light',
|
|
164
|
+
value: 'light'
|
|
165
|
+
}, {
|
|
166
|
+
label: 'Light2',
|
|
167
|
+
value: 'light2'
|
|
168
|
+
}],
|
|
169
|
+
fieldProps: {
|
|
170
|
+
disabled: true
|
|
171
|
+
}
|
|
172
|
+
}, {
|
|
173
|
+
valueType: 'checkboxGroup',
|
|
174
|
+
field: 'checkboxGroup',
|
|
175
|
+
label: 'checkboxGroup',
|
|
176
|
+
options: [{
|
|
177
|
+
label: 'Light',
|
|
178
|
+
value: 'light'
|
|
179
|
+
}, {
|
|
180
|
+
label: 'Light2',
|
|
181
|
+
value: 'light2'
|
|
182
|
+
}]
|
|
183
|
+
}, {
|
|
184
|
+
valueType: 'radioGroup',
|
|
185
|
+
field: 'radioGroup',
|
|
186
|
+
label: 'radioGroup',
|
|
187
|
+
defaultValue: 'light',
|
|
188
|
+
options: [{
|
|
189
|
+
label: 'Light',
|
|
190
|
+
value: 'light'
|
|
191
|
+
}, {
|
|
192
|
+
label: 'Light2',
|
|
193
|
+
value: 'light2'
|
|
194
|
+
}]
|
|
195
|
+
}, {
|
|
196
|
+
valueType: 'inputNumber',
|
|
197
|
+
field: 'inputNumber',
|
|
198
|
+
label: 'inputNumber',
|
|
199
|
+
defaultValue: 2
|
|
200
|
+
}, {
|
|
201
|
+
valueType: 'inputNumberRange',
|
|
202
|
+
field: ['inputNumberRange-min', 'inputNumberRange-max'],
|
|
203
|
+
label: 'inputNumberRange',
|
|
204
|
+
defaultValue: [2, 5]
|
|
205
|
+
}, {
|
|
206
|
+
valueType: 'textArea',
|
|
207
|
+
field: 'textArea',
|
|
208
|
+
label: 'textArea',
|
|
209
|
+
defaultValue: 'qweqwe'
|
|
210
|
+
}, {
|
|
211
|
+
valueType: 'switch',
|
|
212
|
+
field: 'switch',
|
|
213
|
+
label: 'switch'
|
|
214
|
+
}, {
|
|
215
|
+
valueType: 'datePicker',
|
|
216
|
+
field: 'datePicker',
|
|
217
|
+
label: 'datePicker',
|
|
218
|
+
defaultValue: '2025-05-05'
|
|
219
|
+
}];
|
|
220
|
+
var initialValues = getFieldsDefaultValues(fields);
|
|
221
|
+
// console.log(initialValues);
|
|
222
|
+
|
|
223
|
+
return /*#__PURE__*/_jsx(RexProConfigProvider, {
|
|
224
|
+
value: {
|
|
225
|
+
intl: createIntl({
|
|
226
|
+
locale: 'en-US',
|
|
227
|
+
messages: _objectSpread({}, crush(enUS))
|
|
228
|
+
})
|
|
229
|
+
},
|
|
230
|
+
children: /*#__PURE__*/_jsx(ProForm, {
|
|
231
|
+
initialValues: initialValues
|
|
232
|
+
// size="small"
|
|
233
|
+
// readonly
|
|
234
|
+
,
|
|
235
|
+
onFinish: function onFinish(values) {
|
|
236
|
+
console.log(values);
|
|
237
|
+
},
|
|
238
|
+
children: /*#__PURE__*/_jsx(BaseForm, {
|
|
239
|
+
fields: fields,
|
|
240
|
+
type: "descriptions"
|
|
241
|
+
})
|
|
242
|
+
})
|
|
243
|
+
});
|
|
244
|
+
});
|
|
@@ -20,8 +20,8 @@ export default (function () {
|
|
|
20
20
|
data: {
|
|
21
21
|
// min: 2,
|
|
22
22
|
// max: 1111,
|
|
23
|
-
}
|
|
24
|
-
testName: 'qweqwe'
|
|
23
|
+
}
|
|
24
|
+
// testName: 'qweqwe',
|
|
25
25
|
}
|
|
26
26
|
// size="small"
|
|
27
27
|
// disabled
|
|
@@ -32,10 +32,10 @@ export default (function () {
|
|
|
32
32
|
console.log(values);
|
|
33
33
|
},
|
|
34
34
|
children: [/*#__PURE__*/_jsx(ProFormDateRangePickerV2, {
|
|
35
|
-
required:
|
|
35
|
+
required: true,
|
|
36
36
|
label: "\u65E5\u671F\u8303\u56F4",
|
|
37
|
-
name: [['data', 'start'], ['data', 'end']]
|
|
38
|
-
initialValue
|
|
37
|
+
name: [['data', 'start'], ['data', 'end']]
|
|
38
|
+
// initialValue={-30}
|
|
39
39
|
// dataFormat="YYYY-MM-DD"
|
|
40
40
|
}), /*#__PURE__*/_jsx(ProFormText, {
|
|
41
41
|
required: true,
|
|
@@ -35,12 +35,13 @@ export default (function () {
|
|
|
35
35
|
required: true,
|
|
36
36
|
label: "\u6570\u5B57\u8303\u56F4",
|
|
37
37
|
name: [['data', 'min'], ['data', 'max']],
|
|
38
|
-
initialValue: [undefined, 3]
|
|
39
|
-
formItemProps
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
38
|
+
initialValue: [undefined, 3]
|
|
39
|
+
// formItemProps={{
|
|
40
|
+
// style: {
|
|
41
|
+
// margin: 0,
|
|
42
|
+
// },
|
|
43
|
+
// }}
|
|
44
|
+
,
|
|
44
45
|
fieldProps: {
|
|
45
46
|
min: 0,
|
|
46
47
|
max: 1000
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IBaseFormFieldItem } from '../types';
|
|
2
2
|
type Dependency = {
|
|
3
|
-
action:
|
|
3
|
+
action: NonNullable<IBaseFormFieldItem['dependencies']>[number]['action'];
|
|
4
4
|
field: string | string[];
|
|
5
5
|
};
|
|
6
6
|
export declare const processDependencyFields: (dependencies: Dependency[]) => {
|
|
@@ -20,9 +20,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
20
20
|
import { ProFormCascader, ProFormCheckbox, ProFormDatePicker, ProFormDateRangePicker, ProFormDependency, ProFormDigit, ProFormDigitRange, ProFormFieldSet, ProFormItem, ProFormItemRender, ProFormRadio, ProFormSelect, ProFormSwitch, ProFormText, ProFormTextArea, ProFormTreeSelect } from '@ant-design/pro-components';
|
|
21
21
|
import classNames from 'classnames';
|
|
22
22
|
import dayjs from 'dayjs';
|
|
23
|
-
import { BaseForm } from "../base-form";
|
|
24
23
|
import { ProFormDateRangePickerV2 } from "../components/ProFormDateRangePickerV2";
|
|
25
24
|
import { ProFormDigitRangeV2 } from "../components/ProFormDigitRangeV2";
|
|
25
|
+
import { BaseForm } from "../core/base-form";
|
|
26
26
|
import { getFieldsDefaultValues } from "./handlerData";
|
|
27
27
|
import { createElement as _createElement } from "react";
|
|
28
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const BaseFormStyle: import("react").NamedExoticComponent<import("styled-components").ExecutionProps & object>;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const DescriptionsStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { createGlobalStyle } from 'styled-components';
|
|
1
|
+
import styled, { createGlobalStyle } from 'styled-components';
|
|
2
2
|
var compactArr = ['ant-input-outlined', 'ant-select-selector', 'ant-picker', 'ant-input-number-outlined'];
|
|
3
3
|
export var BaseFormStyle = createGlobalStyle([".base-form-field-group{display:flex !important;}.base-form-field-multiple-group{display:flex;width:100%;gap:8px;}.base-form-field-multiple-group.compact{gap:0;", "{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent;}", "{border-top-right-radius:0;border-bottom-right-radius:0;}}.base-form-item{width:var(--item-width);.ant-form-item-label:has(label[title]){width:var(--label-width);}.ant-picker{width:100%;}.ant-space-compact{width:100%;}}"], compactArr.map(function (str) {
|
|
4
4
|
return "> div:not(:first-child) .".concat(str);
|
|
5
5
|
}).join(','), compactArr.map(function (str) {
|
|
6
6
|
return "> div:not(:last-child) .".concat(str);
|
|
7
7
|
}).join(','));
|
|
8
|
-
export var
|
|
8
|
+
export var DescriptionsStyle = styled.div.withConfig({
|
|
9
|
+
displayName: "DescriptionsStyle",
|
|
10
|
+
componentId: "rex-design-aaf4__sc-1e1tacy-0"
|
|
11
|
+
})([".ant-descriptions-view{overflow:auto;}.ant-form-item-additional{position:absolute;}"]);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Descriptions, GetProps } from 'antd';
|
|
2
|
+
import { IBaseFormFieldItem, TFields } from './field-type';
|
|
3
|
+
/** 组件props */
|
|
4
|
+
export interface IBaseFormProps {
|
|
5
|
+
/** 字段配置 */
|
|
6
|
+
fields?: TFields;
|
|
7
|
+
/** 字段对应的本地代码配置 */
|
|
8
|
+
fieldProps?: Record<string, Exclude<IBaseFormProps['fields'], undefined>[number]>;
|
|
9
|
+
/**
|
|
10
|
+
* 每个表单项宽度
|
|
11
|
+
* @default 20%
|
|
12
|
+
*/
|
|
13
|
+
itemWidth?: number | string;
|
|
14
|
+
itemMarginBottom?: number | string;
|
|
15
|
+
/** 每个 label 宽度 */
|
|
16
|
+
labelWidth?: string;
|
|
17
|
+
/**
|
|
18
|
+
* 数据请求器
|
|
19
|
+
* - 不传的情况下用注入的请求器
|
|
20
|
+
*/
|
|
21
|
+
requestOptions?: (api: string, params: Record<string, unknown>, rawItem: IBaseFormFieldItem) => Promise<Exclude<IBaseFormFieldItem['options'], undefined>>;
|
|
22
|
+
/** label 显示到输入框内 */
|
|
23
|
+
inlineLabel?: boolean;
|
|
24
|
+
/** 表单 展示类型 */
|
|
25
|
+
type?: 'form' | 'descriptions';
|
|
26
|
+
/**
|
|
27
|
+
* Descriptions 组件属性
|
|
28
|
+
*/
|
|
29
|
+
descriptionsProps?: Omit<GetProps<typeof Descriptions>, 'items'>;
|
|
30
|
+
}
|
|
@@ -1,32 +1,12 @@
|
|
|
1
1
|
import { ProForm, ProFormCascader, ProFormCheckbox, ProFormDatePicker, ProFormDateRangePicker, ProFormDigit, ProFormDigitRange, ProFormItemRender, ProFormRadio, ProFormSelect, ProFormSwitch, ProFormText, ProFormTextArea, ProFormTreeSelect } from '@ant-design/pro-components';
|
|
2
|
-
import { TButtonFilterItem } from "
|
|
2
|
+
import { TButtonFilterItem } from "../../..";
|
|
3
3
|
import { Form, GetProps } from 'antd';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
import { ProFormDateRangePickerV2 } from '
|
|
6
|
-
import { ProFormDigitRangeV2 } from '
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fields?: Array<TInputProps | TDateRangeProps | TSelectProps | TSelectInputProps | TSelectDimProps | TCustomProps | TSelectDateRangeProps | TCascaderProps | TTreeSelectProps | TCheckboxProps | TCheckboxGroupProps | TRadioGroupProps | TInputNumberProps | TInputNumberRangeProps | TTextAreaProps | TSelectRadioProps | TMultipleComponentsProps | TSwitchProps | TDatePickerProps | THiddenProps | TInputNumberRangeV2Props | TDateRangeV2Props>;
|
|
11
|
-
/** 字段对应的本地代码配置 */
|
|
12
|
-
fieldProps?: Record<string, Exclude<IBaseFormProps['fields'], undefined>[number]>;
|
|
13
|
-
/**
|
|
14
|
-
* 每个表单项宽度
|
|
15
|
-
* @default 20%
|
|
16
|
-
*/
|
|
17
|
-
itemWidth?: number | string;
|
|
18
|
-
itemMarginBottom?: number | string;
|
|
19
|
-
/** 每个 label 宽度 */
|
|
20
|
-
labelWidth?: string;
|
|
21
|
-
/**
|
|
22
|
-
* 数据请求器
|
|
23
|
-
* - 不传的情况下用注入的请求器
|
|
24
|
-
*/
|
|
25
|
-
requestOptions?: (api: string, params: Record<string, unknown>, rawItem: IBaseFormFieldItem) => Promise<Exclude<IBaseFormFieldItem['options'], undefined>>;
|
|
26
|
-
/** label 显示到输入框内 */
|
|
27
|
-
inlineLabel?: boolean;
|
|
28
|
-
}
|
|
29
|
-
type TOmitComponentItemType = 'width';
|
|
5
|
+
import { ProFormDateRangePickerV2 } from '../components/ProFormDateRangePickerV2';
|
|
6
|
+
import { ProFormDigitRangeV2 } from '../components/ProFormDigitRangeV2';
|
|
7
|
+
import { TValueType } from './value-type';
|
|
8
|
+
/** 聚合的表单项类型 */
|
|
9
|
+
export type TFields = Array<TInputProps | TDateRangeProps | TSelectProps | TSelectInputProps | TSelectDimProps | TCustomProps | TSelectDateRangeProps | TCascaderProps | TTreeSelectProps | TCheckboxProps | TCheckboxGroupProps | TRadioGroupProps | TInputNumberProps | TInputNumberRangeProps | TTextAreaProps | TSelectRadioProps | TMultipleComponentsProps | TSwitchProps | TDatePickerProps | THiddenProps | TInputNumberRangeV2Props | TDateRangeV2Props>;
|
|
30
10
|
export type TInputProps = IBaseFormFieldItem<'input'> & Omit<GetProps<typeof ProFormText>, TOmitComponentItemType>;
|
|
31
11
|
export type TSelectProps = IBaseFormFieldItem<'select'> & Omit<GetProps<typeof ProFormSelect>, TOmitComponentItemType>;
|
|
32
12
|
export type TSelectDimProps = IBaseFormFieldItem<'selectDim'> & Omit<GetProps<typeof ProFormSelect>, TOmitComponentItemType>;
|
|
@@ -49,7 +29,7 @@ export type TSelectInputProps = IBaseFormFieldItem<'selectInput'> & Omit<GetProp
|
|
|
49
29
|
export type TSelectDateRangeProps = IBaseFormFieldItem<'selectDateRange'> & Omit<GetProps<typeof ProFormDateRangePicker>, TOmitComponentItemType>;
|
|
50
30
|
export type TMultipleComponentsProps = IBaseFormFieldItem<'multipleComponents'> & GetProps<typeof Form.Item> & {
|
|
51
31
|
/** 组合项 */
|
|
52
|
-
subItems:
|
|
32
|
+
subItems: TFields;
|
|
53
33
|
/** 组合模式,紧凑型 */
|
|
54
34
|
compact?: boolean;
|
|
55
35
|
formItemProps?: GetProps<typeof Form.Item>;
|
|
@@ -58,9 +38,7 @@ export type TCustomProps = IBaseFormFieldItem<'custom'> & GetProps<typeof Form.I
|
|
|
58
38
|
render: (props: Parameters<GetProps<typeof ProFormItemRender>['children']>[0], form?: ReturnType<typeof ProForm.useForm>[0]) => ReactNode;
|
|
59
39
|
formItemProps?: GetProps<typeof Form.Item>;
|
|
60
40
|
};
|
|
61
|
-
/**
|
|
62
|
-
export type TDependencyAction = 'value' | 'search' | 'visible' | 'disabled';
|
|
63
|
-
/** 组件 fields 具体类型 */
|
|
41
|
+
/** 组件 基础fields 类型 */
|
|
64
42
|
export interface IBaseFormFieldItem<T extends TValueType = TValueType> {
|
|
65
43
|
/** 组件类型 */
|
|
66
44
|
valueType: T;
|
|
@@ -83,6 +61,7 @@ export interface IBaseFormFieldItem<T extends TValueType = TValueType> {
|
|
|
83
61
|
*/
|
|
84
62
|
field?: string | string[];
|
|
85
63
|
/**
|
|
64
|
+
* @deprecated 使用 dependenciesV2 替代
|
|
86
65
|
* value 的情况只允许依赖单字段
|
|
87
66
|
* search 的情况只允许依赖多字段
|
|
88
67
|
* visible 的情况只允许依赖多字段
|
|
@@ -90,10 +69,10 @@ export interface IBaseFormFieldItem<T extends TValueType = TValueType> {
|
|
|
90
69
|
*/
|
|
91
70
|
dependencies?: Array<{
|
|
92
71
|
field: string;
|
|
93
|
-
action: Extract<
|
|
72
|
+
action: Extract<'value' | 'search' | 'visible' | 'disabled', 'value'>;
|
|
94
73
|
} | {
|
|
95
74
|
field: string[];
|
|
96
|
-
action: Extract<
|
|
75
|
+
action: Extract<'value' | 'search' | 'visible' | 'disabled', 'search' | 'visible' | 'disabled'>;
|
|
97
76
|
}>;
|
|
98
77
|
dependenciesV2?: IDependenciesV2[];
|
|
99
78
|
/** 选择项 */
|
|
@@ -152,12 +131,22 @@ export interface IBaseFormFieldItem<T extends TValueType = TValueType> {
|
|
|
152
131
|
hidden?: boolean;
|
|
153
132
|
/** 权限key */
|
|
154
133
|
permissionKey?: string;
|
|
134
|
+
/**
|
|
135
|
+
* 栅格占位格数
|
|
136
|
+
* - Descriptions 组件使用
|
|
137
|
+
* - [文档](https://ant.design/components/descriptions-cn)
|
|
138
|
+
*/
|
|
139
|
+
span?: number;
|
|
155
140
|
}
|
|
141
|
+
/** 统一 options 类型 */
|
|
156
142
|
type TOption = {
|
|
157
143
|
label: string;
|
|
158
144
|
value: string | number;
|
|
159
145
|
children?: TOption[];
|
|
160
146
|
};
|
|
147
|
+
/** 统一排除属性 */
|
|
148
|
+
type TOmitComponentItemType = 'width';
|
|
149
|
+
/** 依赖项 */
|
|
161
150
|
export interface IDependenciesV2 extends Partial<Omit<TButtonFilterItem, 'original'>> {
|
|
162
151
|
/** 依赖字段 */
|
|
163
152
|
field: string;
|
|
@@ -174,13 +163,4 @@ export interface IDependenciesV2 extends Partial<Omit<TButtonFilterItem, 'origin
|
|
|
174
163
|
*/
|
|
175
164
|
isTouched?: boolean;
|
|
176
165
|
}
|
|
177
|
-
/** 控件类型 */
|
|
178
|
-
export type TValueType = 'input'
|
|
179
|
-
/** 一次性拉所有 或 配置options */
|
|
180
|
-
| 'select'
|
|
181
|
-
/**
|
|
182
|
-
* @desc 下拉框+输入框
|
|
183
|
-
* @deprecated 建议使用 multipleComponents 进行组合
|
|
184
|
-
*/
|
|
185
|
-
| 'selectInput' | 'selectDim' | 'dateRange' | 'dateRangeV2' | 'selectDateRange' | 'cascader' | 'treeSelect' | 'checkbox' | 'checkboxGroup' | 'radioGroup' | 'inputNumber' | 'inputNumberRange' | 'inputNumberRangeV2' | 'textArea' | 'selectRadio' | 'multipleComponents' | 'switch' | 'datePicker' | 'hidden' | 'upload' | 'table' | 'custom';
|
|
186
166
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** 控件类型 */
|
|
2
|
+
export type TValueType = 'input'
|
|
3
|
+
/** 一次性拉所有 或 配置options */
|
|
4
|
+
| 'select'
|
|
5
|
+
/**
|
|
6
|
+
* @desc 下拉框+输入框
|
|
7
|
+
* @deprecated 建议使用 multipleComponents 进行组合
|
|
8
|
+
*/
|
|
9
|
+
| 'selectInput' | 'selectDim' | 'dateRange' | 'dateRangeV2' | 'selectDateRange' | 'cascader' | 'treeSelect' | 'checkbox' | 'checkboxGroup' | 'radioGroup' | 'inputNumber' | 'inputNumberRange' | 'inputNumberRangeV2' | 'textArea' | 'selectRadio' | 'multipleComponents' | 'switch' | 'datePicker' | 'hidden' | 'upload' | 'table' | 'custom';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|