1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3 | import ConfigProvider from '../config-provider';
|
4 | import Form from './form';
|
5 | import Item from './item';
|
6 | import Submit from './submit';
|
7 | import Reset from './reset';
|
8 | import Error from './error';
|
9 |
|
10 | Form.Item = ConfigProvider.config(Item, {
|
11 | transform: function transform(props, deprecated) {
|
12 | if ('validateStatus' in props) {
|
13 | deprecated('validateStatus', 'validateState', 'Form.Item');
|
14 |
|
15 | var _props = props,
|
16 | validateStatus = _props.validateStatus,
|
17 | others = _objectWithoutProperties(_props, ['validateStatus']);
|
18 |
|
19 | props = _extends({ validateState: validateStatus }, others);
|
20 | }
|
21 |
|
22 | return props;
|
23 | }
|
24 | });
|
25 | Form.Submit = Submit;
|
26 | Form.Reset = Reset;
|
27 | Form.Error = Error;
|
28 |
|
29 | export default ConfigProvider.config(Form, {
|
30 | transform: function transform(props, deprecated) {
|
31 | if ('direction' in props) {
|
32 | deprecated('direction', 'inline', 'Form');
|
33 |
|
34 | var _props2 = props,
|
35 | direction = _props2.direction,
|
36 | others = _objectWithoutProperties(_props2, ['direction']);
|
37 |
|
38 | if (direction === 'hoz') {
|
39 | props = _extends({ inline: true }, others);
|
40 | }
|
41 | }
|
42 |
|
43 | return props;
|
44 | }
|
45 | }); |
\ | No newline at end of file |