@teamix/pro 1.3.11 → 1.3.12
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/pro.js +149 -305
- package/dist/pro.min.js +1 -1
- package/es/form/Filter/index.js +92 -172
- package/es/form/ProForm/index.js +32 -22
- package/es/form/typing.d.ts +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/form/Filter/index.js +91 -171
- package/lib/form/ProForm/index.js +30 -20
- package/lib/form/typing.d.ts +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/es/form/Filter/index.js
CHANGED
@@ -40,7 +40,7 @@ import debounce from 'lodash.debounce';
|
|
40
40
|
import { Tag } from '@alicloudfe/components';
|
41
41
|
import { createForm, onFormReact, onFormInputChange } from '@formily/core';
|
42
42
|
import { toJS } from '@formily/reactive';
|
43
|
-
import { usePrefixCls, isUsable, isNum
|
43
|
+
import { usePrefixCls, isUsable, isNum } from '@teamix/utils';
|
44
44
|
import ProField from '../../field/index';
|
45
45
|
import fieldTypeMap from '../fieldTypeMap';
|
46
46
|
import { getFormDisplayValues } from '../ProForm/useFormDisplayValues';
|
@@ -72,7 +72,6 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
72
72
|
otherProps = _objectWithoutProperties(props, _excluded);
|
73
73
|
|
74
74
|
var _useSpecialProps = useSpecialProps(props),
|
75
|
-
hasChangeDefault = _useSpecialProps.hasChangeDefault,
|
76
75
|
hasRequired = _useSpecialProps.hasRequired;
|
77
76
|
|
78
77
|
var _useState = useState(!!expand),
|
@@ -92,56 +91,66 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
92
91
|
var prefixCls = usePrefixCls('', {
|
93
92
|
prefix: 'teamix-pro-form-query-filter'
|
94
93
|
});
|
95
|
-
|
96
|
-
|
97
|
-
|
94
|
+
var debounceFun = debounce(function (fun, props) {
|
95
|
+
return fun(props);
|
96
|
+
}, filterDebounce); // onInit
|
98
97
|
|
98
|
+
var initialRequestRef = useRef(!!(props === null || props === void 0 ? void 0 : props.initialRequest));
|
99
99
|
var filterEnable = useRef('waiting');
|
100
100
|
|
101
|
-
var
|
102
|
-
var
|
103
|
-
|
101
|
+
var onFormInit = /*#__PURE__*/function () {
|
102
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(form) {
|
103
|
+
var loadingField;
|
104
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
105
|
+
while (1) {
|
106
|
+
switch (_context.prev = _context.next) {
|
107
|
+
case 0:
|
108
|
+
form.setState({
|
109
|
+
loading: initialRequestRef.current
|
110
|
+
}); // 借用 form.loading 触发 onFormReact
|
104
111
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
loading: !!initialRequest || !!initialValues
|
109
|
-
});
|
110
|
-
}
|
112
|
+
loadingField = Object.values(form.fields).filter(function (field) {
|
113
|
+
return !!field.loading;
|
114
|
+
}); // 等待mounted + 字段loading结束 + initialRequest结束 => 表单默认值初始化完成
|
111
115
|
|
112
|
-
|
113
|
-
|
114
|
-
|
116
|
+
if (!(form.mounted && !loadingField.length && !form.loading)) {
|
117
|
+
_context.next = 10;
|
118
|
+
break;
|
119
|
+
}
|
120
|
+
|
121
|
+
onFormInit = function onFormInit() {}; // init后销毁 isFormInit 方法
|
115
122
|
|
116
|
-
if (form.mounted && !loadingField.length && !form.loading) {
|
117
|
-
_onFormInit = function onFormInit() {}; // init后销毁 isFormInit 方法
|
118
123
|
|
124
|
+
filterEnable.current = 'filter';
|
125
|
+
|
126
|
+
if (!onInit) {
|
127
|
+
_context.next = 10;
|
128
|
+
break;
|
129
|
+
}
|
119
130
|
|
120
|
-
|
131
|
+
_context.next = 8;
|
132
|
+
return form.validate();
|
121
133
|
|
122
|
-
|
123
|
-
|
124
|
-
filterEnable.current = 'filter';
|
125
|
-
setTimeout(function () {
|
126
|
-
onInit === null || onInit === void 0 ? void 0 : onInit(toJS(form.values));
|
127
|
-
}, 0);
|
134
|
+
case 8:
|
135
|
+
onInit === null || onInit === void 0 ? void 0 : onInit(toJS(form.values)); // 设置Tag
|
128
136
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
137
|
+
if (mode === 'panel') {
|
138
|
+
configFilterItem(advancedForm);
|
139
|
+
!panelVisible && configTag();
|
140
|
+
}
|
133
141
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
}, 0);
|
142
|
+
case 10:
|
143
|
+
case "end":
|
144
|
+
return _context.stop();
|
138
145
|
}
|
139
146
|
}
|
140
|
-
}
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
147
|
+
}, _callee);
|
148
|
+
}));
|
149
|
+
|
150
|
+
return function onFormInit(_x) {
|
151
|
+
return _ref.apply(this, arguments);
|
152
|
+
};
|
153
|
+
}(); // 配置当前激活的form实例
|
145
154
|
|
146
155
|
|
147
156
|
var setCurrentForm = function setCurrentForm(formName) {
|
@@ -167,7 +176,7 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
167
176
|
effects: function effects() {
|
168
177
|
onFormReact(function (form) {
|
169
178
|
if (mode === 'inline') {
|
170
|
-
|
179
|
+
onFormInit(form);
|
171
180
|
}
|
172
181
|
});
|
173
182
|
}
|
@@ -191,7 +200,7 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
191
200
|
effects: function effects() {
|
192
201
|
onFormReact(function (form) {
|
193
202
|
if (mode === 'panel') {
|
194
|
-
|
203
|
+
onFormInit(form);
|
195
204
|
}
|
196
205
|
});
|
197
206
|
onFormInputChange(function (form) {
|
@@ -272,93 +281,62 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
272
281
|
}, [panelVisible, configTag]); // 简单搜索Filter
|
273
282
|
|
274
283
|
var onSimpleFilter = useCallback( /*#__PURE__*/function () {
|
275
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
276
|
-
return regeneratorRuntime.wrap(function
|
284
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(values) {
|
285
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
277
286
|
while (1) {
|
278
|
-
switch (
|
287
|
+
switch (_context2.prev = _context2.next) {
|
279
288
|
case 0:
|
280
|
-
|
281
|
-
_context.next = 14;
|
282
|
-
break;
|
283
|
-
}
|
284
|
-
|
285
|
-
if (!(filterEnable.current === 'initialized')) {
|
286
|
-
_context.next = 9;
|
287
|
-
break;
|
288
|
-
}
|
289
|
-
|
290
|
-
filterEnable.current = 'filter';
|
291
|
-
|
292
|
-
if (!hasRequired) {
|
293
|
-
_context.next = 6;
|
294
|
-
break;
|
295
|
-
}
|
296
|
-
|
297
|
-
_context.next = 6;
|
298
|
-
return simpleForm.validate();
|
299
|
-
|
300
|
-
case 6:
|
301
|
-
onInit === null || onInit === void 0 ? void 0 : onInit(values);
|
302
|
-
_context.next = 14;
|
303
|
-
break;
|
304
|
-
|
305
|
-
case 9:
|
306
|
-
if (!(filterEnable.current === 'filter')) {
|
307
|
-
_context.next = 14;
|
308
|
-
break;
|
309
|
-
}
|
310
|
-
|
311
|
-
if (!hasRequired) {
|
312
|
-
_context.next = 13;
|
313
|
-
break;
|
314
|
-
}
|
315
|
-
|
316
|
-
_context.next = 13;
|
289
|
+
_context2.next = 2;
|
317
290
|
return simpleForm.validate();
|
318
291
|
|
319
|
-
case
|
292
|
+
case 2:
|
320
293
|
onFilter === null || onFilter === void 0 ? void 0 : onFilter(values);
|
321
294
|
|
322
|
-
case
|
295
|
+
case 3:
|
323
296
|
case "end":
|
324
|
-
return
|
297
|
+
return _context2.stop();
|
325
298
|
}
|
326
299
|
}
|
327
|
-
},
|
300
|
+
}, _callee2);
|
328
301
|
}));
|
329
302
|
|
330
|
-
return function (
|
303
|
+
return function (_x2) {
|
331
304
|
return _ref4.apply(this, arguments);
|
332
305
|
};
|
333
|
-
}(), [onFilter
|
306
|
+
}(), [onFilter]); // 简单搜索Change
|
334
307
|
|
335
308
|
var onSimpleChange = useCallback(function (values, fieldValue, fieldName) {
|
336
309
|
if (currentForm.current === 'simple') {
|
337
310
|
onChange === null || onChange === void 0 ? void 0 : onChange(values, fieldValue, fieldName);
|
311
|
+
|
312
|
+
if (filterEnable.current === 'filter') {
|
313
|
+
debounceFun(onSimpleFilter, values);
|
314
|
+
}
|
338
315
|
}
|
339
316
|
}, [onChange]); // 轻量搜索Filter
|
340
317
|
|
341
318
|
var onLightFilter = useCallback(function (values) {
|
342
|
-
|
343
|
-
if (filterEnable.current === 'filter') {
|
344
|
-
var _Object$keys;
|
319
|
+
var _Object$keys;
|
345
320
|
|
346
|
-
|
321
|
+
onFilter === null || onFilter === void 0 ? void 0 : onFilter(values); // 清空advancedForm的值
|
347
322
|
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
}
|
323
|
+
var clearKeys = {};
|
324
|
+
(_Object$keys = Object.keys(advancedForm.values)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.forEach(function (key) {
|
325
|
+
clearKeys[key] = undefined;
|
326
|
+
});
|
327
|
+
advancedForm.setValues(clearKeys); // 配置Tag
|
328
|
+
|
329
|
+
configFilterItem(advancedForm);
|
330
|
+
configTag();
|
357
331
|
}, [onFilter]); // 轻量搜索Change
|
358
332
|
|
359
333
|
var onLightChange = useCallback(function (values, fieldValue, fieldName) {
|
360
334
|
if (currentForm.current === 'light') {
|
361
335
|
onChange === null || onChange === void 0 ? void 0 : onChange(values, fieldValue, fieldName);
|
336
|
+
|
337
|
+
if (filterEnable.current === 'filter') {
|
338
|
+
debounceFun(onLightFilter, values);
|
339
|
+
}
|
362
340
|
}
|
363
341
|
}, [onChange]); // 高级搜索Filter
|
364
342
|
|
@@ -380,54 +358,7 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
380
358
|
lightForm.reset('*', {
|
381
359
|
forceClear: true
|
382
360
|
});
|
383
|
-
}, [onReset]); // 高级搜索
|
384
|
-
|
385
|
-
var onAdvancedInit = useCallback( /*#__PURE__*/function () {
|
386
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(values) {
|
387
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
388
|
-
while (1) {
|
389
|
-
switch (_context2.prev = _context2.next) {
|
390
|
-
case 0:
|
391
|
-
if (!(currentForm.current === 'advanced')) {
|
392
|
-
_context2.next = 9;
|
393
|
-
break;
|
394
|
-
}
|
395
|
-
|
396
|
-
if (!(filterEnable.current === 'initialized')) {
|
397
|
-
_context2.next = 9;
|
398
|
-
break;
|
399
|
-
}
|
400
|
-
|
401
|
-
filterEnable.current = 'filter';
|
402
|
-
|
403
|
-
if (!hasRequired) {
|
404
|
-
_context2.next = 6;
|
405
|
-
break;
|
406
|
-
}
|
407
|
-
|
408
|
-
_context2.next = 6;
|
409
|
-
return advancedForm.validate();
|
410
|
-
|
411
|
-
case 6:
|
412
|
-
onInit === null || onInit === void 0 ? void 0 : onInit(values);
|
413
|
-
configFilterItem(advancedForm);
|
414
|
-
|
415
|
-
if (!panelVisible) {
|
416
|
-
configTag();
|
417
|
-
}
|
418
|
-
|
419
|
-
case 9:
|
420
|
-
case "end":
|
421
|
-
return _context2.stop();
|
422
|
-
}
|
423
|
-
}
|
424
|
-
}, _callee2);
|
425
|
-
}));
|
426
|
-
|
427
|
-
return function (_x2) {
|
428
|
-
return _ref5.apply(this, arguments);
|
429
|
-
};
|
430
|
-
}(), [hasRequired, onInit]); // 高级搜索Change
|
361
|
+
}, [onReset]); // 高级搜索Change
|
431
362
|
|
432
363
|
var onAdvancedChange = useCallback(function (values, fieldValue, fieldName) {
|
433
364
|
if (currentForm.current === 'advanced') {
|
@@ -447,16 +378,14 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
447
378
|
configFilterItem(advancedForm);
|
448
379
|
configTag();
|
449
380
|
onFilter === null || onFilter === void 0 ? void 0 : onFilter(toJS(advancedForm.values));
|
450
|
-
}, [onFilter]); //
|
381
|
+
}, [onFilter]); // initialRequest 的回调
|
451
382
|
|
452
383
|
var onInitialComplete = useCallback(function (form) {
|
384
|
+
initialRequestRef.current = false;
|
453
385
|
form.setState({
|
454
|
-
loading:
|
386
|
+
loading: initialRequestRef.current
|
455
387
|
});
|
456
|
-
}, []);
|
457
|
-
var debounceFun = debounce(function (fun, props) {
|
458
|
-
return fun(props);
|
459
|
-
}, filterDebounce); // 组件挂载
|
388
|
+
}, []); // 组件挂载
|
460
389
|
|
461
390
|
useEffect(function () {
|
462
391
|
setCurrentForm(currentForm.current);
|
@@ -475,37 +404,28 @@ var QueryFilter = /*#__PURE__*/memo(function (props) {
|
|
475
404
|
filterValues: filterValues,
|
476
405
|
activeFilterValueRef: activeFilterValueRef,
|
477
406
|
form: lightForm,
|
478
|
-
onChange:
|
479
|
-
debounceFun(onLightFilter, values);
|
480
|
-
onLightChange(values, fieldValue, fieldName);
|
481
|
-
}
|
407
|
+
onChange: onLightChange
|
482
408
|
}))) : /*#__PURE__*/React.createElement("div", {
|
483
409
|
className: "".concat(prefixCls, "-inline")
|
484
410
|
}, /*#__PURE__*/React.createElement(SimpleFilter, _objectSpread(_objectSpread({}, otherProps), {}, {
|
485
411
|
form: simpleForm,
|
486
|
-
onChange:
|
487
|
-
debounceFun(onSimpleFilter, values);
|
488
|
-
onSimpleChange(values, fieldValue, fieldName);
|
489
|
-
},
|
412
|
+
onChange: onSimpleChange,
|
490
413
|
onSubmit: onSimpleFilter,
|
491
414
|
onInitialComplete: onInitialComplete
|
492
415
|
}))),
|
493
416
|
panelContent: mode === 'panel' ? /*#__PURE__*/React.createElement(AdvancedFilter, _objectSpread(_objectSpread({}, otherProps), {}, {
|
494
417
|
form: advancedForm,
|
495
|
-
onChange:
|
496
|
-
debounceFun(onAdvancedInit, values);
|
497
|
-
onAdvancedChange(values, fieldValue, fieldName);
|
498
|
-
},
|
418
|
+
onChange: onAdvancedChange,
|
499
419
|
onSubmit: onAdvancedFilter,
|
500
420
|
onReset: onAdvancedReset,
|
501
421
|
onInitialComplete: onInitialComplete
|
502
422
|
})) : null
|
503
|
-
}, mode === 'panel' && !panelVisible ? /*#__PURE__*/React.createElement(Tag.Group, null, tagDataSource.map(function (
|
504
|
-
var key =
|
505
|
-
label =
|
506
|
-
value =
|
507
|
-
type =
|
508
|
-
index =
|
423
|
+
}, mode === 'panel' && !panelVisible ? /*#__PURE__*/React.createElement(Tag.Group, null, tagDataSource.map(function (_ref5) {
|
424
|
+
var key = _ref5.key,
|
425
|
+
label = _ref5.label,
|
426
|
+
value = _ref5.value,
|
427
|
+
type = _ref5.type,
|
428
|
+
index = _ref5.index;
|
509
429
|
return /*#__PURE__*/React.createElement(Tag.Closeable, {
|
510
430
|
key: isNum(index) ? key + label : key,
|
511
431
|
afterClose: function afterClose() {
|
package/es/form/ProForm/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
var _excluded = ["form", "initialValues", "initialRequest", "schema", "scope", "context", "components", "children", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onSubmit", "onSubmitFailed", "onInitialComplete", "className", "validateFirst"];
|
1
|
+
var _excluded = ["form", "initialValues", "initialRequest", "schema", "scope", "context", "components", "children", "layout", "labelAlign", "wrapperAlign", "labelCol", "wrapperCol", "breakpoints", "onChange", "onChangeType", "onSubmit", "onSubmitFailed", "onInitialComplete", "className", "validateFirst"];
|
2
2
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
4
|
|
@@ -10,9 +10,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
10
10
|
|
11
11
|
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; }
|
12
12
|
|
13
|
-
import React, { memo,
|
13
|
+
import React, { memo, useMemo } from 'react';
|
14
14
|
import cls from 'classnames';
|
15
|
-
import { createForm, onFieldValueChange, registerValidateLocale, setValidateLanguage } from '@formily/core';
|
15
|
+
import { createForm, onFieldValueChange, onFormValuesChange, registerValidateLocale, setValidateLanguage } from '@formily/core';
|
16
16
|
import { toJS } from '@formily/reactive';
|
17
17
|
import { Form } from '@teamix/formily';
|
18
18
|
import { usePrefixCls, getLanguage, getGlobalConfig } from '@teamix/utils';
|
@@ -39,6 +39,7 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
39
39
|
wrapperCol = _ref.wrapperCol,
|
40
40
|
breakpoints = _ref.breakpoints,
|
41
41
|
onChange = _ref.onChange,
|
42
|
+
onChangeType = _ref.onChangeType,
|
42
43
|
onSubmit = _ref.onSubmit,
|
43
44
|
onSubmitFailed = _ref.onSubmitFailed,
|
44
45
|
onInitialComplete = _ref.onInitialComplete,
|
@@ -85,35 +86,44 @@ var ProForm = /*#__PURE__*/memo(function (_ref) {
|
|
85
86
|
labelCol: mergeArrayValue([24], labelCol),
|
86
87
|
wrapperCol: mergeArrayValue([24], wrapperCol)
|
87
88
|
};
|
88
|
-
}, [breakpoints, layout, labelAlign, wrapperAlign, labelCol, wrapperCol]);
|
89
|
-
|
90
|
-
|
91
|
-
form.removeEffects('onFieldValueChange');
|
92
|
-
form.addEffects('onFieldValueChange', function () {
|
93
|
-
onFieldValueChange('*', function (field, form) {
|
94
|
-
var _field$props;
|
95
|
-
|
96
|
-
onChange && onChange(toJS(form.values), toJS(field.value), (_field$props = field.props) === null || _field$props === void 0 ? void 0 : _field$props.name);
|
97
|
-
});
|
98
|
-
});
|
99
|
-
}, [form, onChange]); // 配置表单默认值
|
100
|
-
|
101
|
-
useEffect(function () {
|
89
|
+
}, [breakpoints, layout, labelAlign, wrapperAlign, labelCol, wrapperCol]);
|
90
|
+
useMemo(function () {
|
91
|
+
// 配置表单默认值
|
102
92
|
if (initialValues) {
|
103
93
|
form.setInitialValues(initialValues);
|
104
|
-
onInitialComplete === null || onInitialComplete === void 0 ? void 0 : onInitialComplete(form);
|
105
94
|
} else if (initialRequest) {
|
106
95
|
useInitialRequest(initialRequest).then(function (values) {
|
107
96
|
form.setInitialValues(values);
|
108
97
|
}).finally(function () {
|
109
98
|
onInitialComplete === null || onInitialComplete === void 0 ? void 0 : onInitialComplete(form);
|
110
99
|
});
|
111
|
-
}
|
112
|
-
|
100
|
+
} // 配置国际化
|
101
|
+
|
113
102
|
|
114
|
-
useEffect(function () {
|
115
103
|
setValidateLanguage(getLanguage() || 'zh-cn');
|
116
|
-
}, []);
|
104
|
+
}, []); // 添加 onChange 事件
|
105
|
+
|
106
|
+
useMemo(function () {
|
107
|
+
if (onChangeType === 'form') {
|
108
|
+
// 使用 onFormValuesChange 无法监听具体变化字段
|
109
|
+
form.removeEffects('onChangeByFormValuesChange');
|
110
|
+
form.addEffects('onChangeByFormValuesChange', function () {
|
111
|
+
onFormValuesChange(function (form) {
|
112
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(toJS(form.values));
|
113
|
+
});
|
114
|
+
});
|
115
|
+
} else {
|
116
|
+
// 使用 onFieldValueChange 无法监听数组类型值的增删
|
117
|
+
form.removeEffects('onChangeByFieldValueChange');
|
118
|
+
form.addEffects('onChangeByFieldValueChange', function () {
|
119
|
+
onFieldValueChange('*', function (field, form) {
|
120
|
+
var _field$props;
|
121
|
+
|
122
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(toJS(form.values), toJS(field.value), (_field$props = field.props) === null || _field$props === void 0 ? void 0 : _field$props.name);
|
123
|
+
});
|
124
|
+
});
|
125
|
+
}
|
126
|
+
}, [onChange]);
|
117
127
|
return /*#__PURE__*/React.createElement(Form, _objectSpread(_objectSpread(_objectSpread({
|
118
128
|
className: cls(prefixCls, className)
|
119
129
|
}, otherProps), getTeamixLayout), {}, {
|
package/es/form/typing.d.ts
CHANGED
@@ -67,6 +67,7 @@ export interface ProFormProps extends IFormLayoutProps {
|
|
67
67
|
initialRequest?: ProFormRequestConfig;
|
68
68
|
previewTextPlaceholder?: ReactNode;
|
69
69
|
validateFirst?: boolean;
|
70
|
+
onChangeType?: 'form';
|
70
71
|
onChange?: (values: any, fieldValue?: any, fieldName?: any) => any;
|
71
72
|
onSubmit?: ((values: any) => any) | CommonRequestConfig;
|
72
73
|
onSubmitFailed?: (feedbacks: IFormFeedback[]) => void;
|
package/es/index.d.ts
CHANGED
@@ -26,5 +26,5 @@ export * from './table';
|
|
26
26
|
export * from './sidebar';
|
27
27
|
export * from './utils';
|
28
28
|
export * from './timeline';
|
29
|
-
declare const version = "1.3.
|
29
|
+
declare const version = "1.3.12";
|
30
30
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -31,6 +31,6 @@ export * from './sidebar';
|
|
31
31
|
export * from './utils'; // export * from './sidebar';
|
32
32
|
|
33
33
|
export * from './timeline';
|
34
|
-
var version = '1.3.
|
34
|
+
var version = '1.3.12';
|
35
35
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
36
36
|
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils };
|