1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3 | import ConfigProvider from '../config-provider';
|
4 | import Progress from './view/progress';
|
5 |
|
6 | export default ConfigProvider.config(Progress, {
|
7 | transform: function transform(props, deprecated) {
|
8 | if ('type' in props) {
|
9 | deprecated('type', 'progressive', 'Progress');
|
10 |
|
11 | var _props = props,
|
12 | type = _props.type,
|
13 | others = _objectWithoutProperties(_props, ['type']);
|
14 |
|
15 | props = _extends({ progressive: type === 'progressive' }, others);
|
16 | }
|
17 |
|
18 | if ('showInfo' in props) {
|
19 | deprecated('showInfo', 'textRender', 'Progress');
|
20 |
|
21 | var _props2 = props,
|
22 | showInfo = _props2.showInfo,
|
23 | _others = _objectWithoutProperties(_props2, ['showInfo']);
|
24 |
|
25 | if (showInfo) {
|
26 | props = _others;
|
27 | } else {
|
28 | props = _extends({ textRender: function textRender() {
|
29 | return false;
|
30 | } }, _others);
|
31 | }
|
32 | }
|
33 |
|
34 | if ('suffix' in props) {
|
35 | deprecated('suffix', 'textRender', 'Progress');
|
36 |
|
37 | var _props3 = props,
|
38 | suffix = _props3.suffix,
|
39 | _others2 = _objectWithoutProperties(_props3, ['suffix']);
|
40 |
|
41 | props = _extends({ textRender: function textRender() {
|
42 | return suffix;
|
43 | } }, _others2);
|
44 | }
|
45 |
|
46 | return props;
|
47 | }
|
48 | }); |
\ | No newline at end of file |