1 | import _extends from 'babel-runtime/helpers/extends';
|
2 | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3 | import ConfigProvider from '../config-provider';
|
4 | import CascaderSelect from './cascader-select';
|
5 |
|
6 | export default ConfigProvider.config(CascaderSelect, {
|
7 | transform: function transform(props, deprecated) {
|
8 | if ('shape' in props) {
|
9 | deprecated('shape', 'hasBorder', 'CascaderSelect');
|
10 |
|
11 | var _props = props,
|
12 | shape = _props.shape,
|
13 | others = _objectWithoutProperties(_props, ['shape']);
|
14 |
|
15 | props = _extends({ hasBorder: shape !== 'arrow-only' }, others);
|
16 | }
|
17 |
|
18 | if ('container' in props) {
|
19 | deprecated('container', 'popupContainer', 'CascaderSelect');
|
20 |
|
21 | var _props2 = props,
|
22 | container = _props2.container,
|
23 | _others = _objectWithoutProperties(_props2, ['container']);
|
24 |
|
25 | props = _extends({ popupContainer: container }, _others);
|
26 | }
|
27 |
|
28 | if ('expandTrigger' in props) {
|
29 | deprecated('expandTrigger', 'expandTriggerType', 'CascaderSelect');
|
30 |
|
31 | var _props3 = props,
|
32 | expandTrigger = _props3.expandTrigger,
|
33 | _others2 = _objectWithoutProperties(_props3, ['expandTrigger']);
|
34 |
|
35 | props = _extends({ expandTriggerType: expandTrigger }, _others2);
|
36 | }
|
37 |
|
38 | if ('showItemCount' in props) {
|
39 | deprecated('showItemCount', 'listStyle | listClassName', 'CascaderSelect');
|
40 | }
|
41 | if ('labelWidth' in props) {
|
42 | deprecated('labelWidth', 'listStyle | listClassName', 'CascaderSelect');
|
43 | }
|
44 |
|
45 | return props;
|
46 | }
|
47 | }); |
\ | No newline at end of file |