@kdcloudjs/kdesign 1.7.18 → 1.7.19

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.
@@ -167,9 +167,11 @@
167
167
  }
168
168
  .kd-carousel-list-fade .kd-carousel-list-item-not-hidden {
169
169
  opacity: 1;
170
+ z-index: 1;
170
171
  }
171
172
  .kd-carousel-list-fade .kd-carousel-list-item-hidden {
172
173
  opacity: 0;
174
+ z-index: 0;
173
175
  }
174
176
  .kd-carousel-list-display {
175
177
  width: 100%;
@@ -187,6 +189,7 @@
187
189
  position: absolute;
188
190
  list-style: none;
189
191
  padding: 0;
192
+ z-index: 1;
190
193
  }
191
194
  .kd-carousel-slidebar-left {
192
195
  display: -webkit-box;
@@ -299,6 +302,7 @@
299
302
  right: 16px;
300
303
  -webkit-transform: translateY(-50%);
301
304
  transform: translateY(-50%);
305
+ z-index: 1;
302
306
  }
303
307
  .kd-carousel-jump-left {
304
308
  left: 16px;
@@ -1,6 +1,7 @@
1
1
  @import '../../style/themes/index';
2
2
  @import './mixin.less';
3
3
  @carousel-prefix-cls: ~'@{kd-prefix}-carousel';
4
+
4
5
  .@{carousel-prefix-cls} {
5
6
  &-root {
6
7
  position: relative;
@@ -27,18 +28,23 @@
27
28
 
28
29
  &-slide {
29
30
  width: 100%;
31
+
30
32
  .@{carousel-prefix-cls}-list-item {
31
33
  opacity: 1;
32
34
  border-radius: @carousel-boder-radius;
35
+
33
36
  &-animation {
34
37
  transition: opacity 0.3s ease;
35
38
  }
39
+
36
40
  &-none-animation {
37
41
  transition: none;
38
42
  }
43
+
39
44
  &-not-hidden {
40
45
  opacity: 1;
41
46
  }
47
+
42
48
  &-hidden {
43
49
  opacity: 0;
44
50
  }
@@ -47,30 +53,40 @@
47
53
 
48
54
  &-fade {
49
55
  flex: 1;
56
+
50
57
  .@{carousel-prefix-cls}-list-item {
51
58
  opacity: 1;
59
+
52
60
  &-animation {
53
61
  transition: opacity 0.3s ease;
54
62
  }
63
+
55
64
  &-none-animation {
56
65
  transition: none;
57
66
  }
67
+
58
68
  &-not-hidden {
59
69
  opacity: 1;
70
+ z-index: 1;
60
71
  }
72
+
61
73
  &-hidden {
62
74
  opacity: 0;
75
+ z-index: 0;
63
76
  }
64
77
  }
65
78
  }
66
79
 
67
80
  &-display {
68
81
  width: 100%;
82
+
69
83
  .@{carousel-prefix-cls}-list-item {
70
84
  display: block;
85
+
71
86
  &-not-hidden {
72
87
  display: block;
73
88
  }
89
+
74
90
  &-hidden {
75
91
  display: none;
76
92
  }
@@ -82,25 +98,29 @@
82
98
  position: absolute;
83
99
  list-style: none;
84
100
  padding: 0;
101
+ z-index: 1;
85
102
 
86
103
  &-left {
87
104
  .vertical;
88
105
  left: @carousel-dots-margin-left;
89
106
  }
107
+
90
108
  &-right {
91
109
  .vertical;
92
110
  right: @carousel-dots-margin-right;
93
111
  }
112
+
94
113
  &-bottom {
95
114
  .horizontal;
96
115
  bottom: @carousel-dots-margin-bottom;
97
116
  }
117
+
98
118
  &-top {
99
119
  .horizontal;
100
120
  top: @carousel-dots-margin-top;
101
121
  }
102
122
 
103
- &-dot > button {
123
+ &-dot>button {
104
124
  display: block;
105
125
  border-radius: @carousel-dots-boder-radius;
106
126
  box-sizing: border-box;
@@ -123,9 +143,11 @@
123
143
  width: 100%;
124
144
  cursor: pointer;
125
145
  outline: none;
146
+
126
147
  &-active {
127
148
  opacity: 1;
128
- & > button {
149
+
150
+ &>button {
129
151
  background-color: @carousel-dots-color-background-active;
130
152
  opacity: 1;
131
153
  }
@@ -139,6 +161,7 @@
139
161
  left: unset;
140
162
  right: 16px;
141
163
  transform: translateY(-50%);
164
+ z-index: 1;
142
165
 
143
166
  &-left {
144
167
  left: 16px;
@@ -149,7 +172,7 @@
149
172
  cursor: pointer;
150
173
  }
151
174
 
152
- > *:first-child {
175
+ >*:first-child {
153
176
  display: flex;
154
177
  align-items: center;
155
178
  justify-content: center;
@@ -173,12 +196,14 @@
173
196
  }
174
197
  }
175
198
  }
199
+
176
200
  .vertical {
177
201
  display: flex;
178
202
  flex-direction: column;
179
203
  top: 50%;
180
204
  transform: translateY(-50%);
181
- & > li {
205
+
206
+ &>li {
182
207
  margin: @carousel-dots-marigin 0;
183
208
  width: @carousel-dots-height;
184
209
  height: @carousel-dots-width;
@@ -190,7 +215,8 @@
190
215
  flex-direction: row;
191
216
  left: 50%;
192
217
  transform: translateX(-50%);
193
- & > li {
218
+
219
+ &>li {
194
220
  margin: 0 @carousel-dots-marigin;
195
221
  height: @carousel-dots-height;
196
222
  width: @carousel-dots-width;
@@ -357,8 +357,10 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
357
357
  var value = _ref5[fieldNames.value];
358
358
  return value;
359
359
  });
360
- setCurrentOptions(selectedOptions);
361
- props.value === undefined && setValue(selectedValue);
360
+ if (typeof props.value === 'undefined') {
361
+ setCurrentOptions(selectedOptions);
362
+ setValue(selectedValue);
363
+ }
362
364
  props.onChange && props.onChange(selectedValue, selectedOptions);
363
365
  };
364
366
  var onVisibleChange = function onVisibleChange(visible) {
@@ -11,7 +11,7 @@ export interface CollapseProps {
11
11
  defaultActiveKey?: string[] | string | number[] | number;
12
12
  expandIcon?: React.ReactNode | ((props: PanelProps) => React.ReactNode);
13
13
  expandIconPosition?: IconPositionType;
14
- onChange?: () => void;
14
+ onChange?: (v: any) => void;
15
15
  style?: React.CSSProperties;
16
16
  className?: string;
17
17
  children?: React.ReactNode;
@@ -19,6 +19,7 @@ export interface DropDownProps extends PopperProps {
19
19
  children?: React.ReactNode;
20
20
  onItemClick?: (key: string) => void;
21
21
  menu: React.ReactElement | Array<MenuItem>;
22
+ menuAnimation?: boolean;
22
23
  }
23
24
  interface DropdownType extends React.ForwardRefExoticComponent<DropDownProps & React.RefAttributes<HTMLElement>> {
24
25
  Menu: typeof Menu;
@@ -31,9 +31,11 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
31
31
  defaultVisible = allProps.defaultVisible,
32
32
  onVisibleChange = allProps.onVisibleChange,
33
33
  trigger = allProps.trigger,
34
- customPrefixcls = allProps.prefixCls;
35
- // className前缀
34
+ customPrefixcls = allProps.prefixCls,
35
+ menuAnimation = allProps.menuAnimation,
36
+ popperStyle = allProps.popperStyle;
36
37
  var prefixCls = getPrefixCls(pkgPrefixCls, 'dropdown', customPrefixcls);
38
+ var innerAnimation = typeof menuAnimation === 'boolean' ? menuAnimation : trigger !== 'contextMenu';
37
39
  var _React$useState = React.useState(!!props.visible || defaultVisible),
38
40
  _React$useState2 = _slicedToArray(_React$useState, 2),
39
41
  visible = _React$useState2[0],
@@ -127,6 +129,9 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (props, ref) {
127
129
  var popperProps = _extends(_extends({}, allProps), {
128
130
  visible: visible,
129
131
  prefixCls: prefixCls,
132
+ popperStyle: innerAnimation ? popperStyle : _extends({
133
+ animation: 'none'
134
+ }, popperStyle),
130
135
  onVisibleChange: handleVisibleChange
131
136
  });
132
137
  return usePopper(child, menuElement, popperProps);
@@ -37,7 +37,7 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
37
37
  step((generator = generator.apply(thisArg, _arguments || [])).next());
38
38
  });
39
39
  };
40
- import React, { Children } from 'react';
40
+ import React, { Children, forwardRef, useContext, useEffect, useImperativeHandle, useRef, useState } from 'react';
41
41
  import classNames from 'classnames';
42
42
  import ConfigContext from '../config-provider/ConfigContext';
43
43
  import { getCompProps } from '../_utils';
@@ -73,12 +73,11 @@ function abort(file) {
73
73
  }
74
74
  var InternalUpload = function InternalUpload(props, ref) {
75
75
  var _context5, _classNames, _context6, _context7;
76
- var _React$useContext = React.useContext(ConfigContext),
77
- getPrefixCls = _React$useContext.getPrefixCls,
78
- pkgPrefixCls = _React$useContext.prefixCls,
79
- userDefaultProps = _React$useContext.compDefaultProps;
80
- var innerRef = React.useRef();
81
- var mergedRef = ref || innerRef;
76
+ var _useContext = useContext(ConfigContext),
77
+ getPrefixCls = _useContext.getPrefixCls,
78
+ pkgPrefixCls = _useContext.prefixCls,
79
+ userDefaultProps = _useContext.compDefaultProps;
80
+ var inputRef = useRef(null);
82
81
  var allProps = getCompProps('Upload', userDefaultProps, props); // 属性需要合并一遍用户定义的默认属性
83
82
  var type = allProps.type,
84
83
  style = allProps.style,
@@ -94,15 +93,15 @@ var InternalUpload = function InternalUpload(props, ref) {
94
93
  showUploadList = allProps.showUploadList,
95
94
  customPrefixcls = allProps.prefixCls,
96
95
  onPreview = allProps.onPreview;
97
- var _React$useState = React.useState(props.fileList || props.defaultFileList || []),
98
- _React$useState2 = _slicedToArray(_React$useState, 2),
99
- fileList = _React$useState2[0],
100
- setFileList = _React$useState2[1];
96
+ var _useState = useState(props.fileList || props.defaultFileList || []),
97
+ _useState2 = _slicedToArray(_useState, 2),
98
+ fileList = _useState2[0],
99
+ setFileList = _useState2[1];
101
100
  var hasChildren = children && Children.toArray(children).length > 0;
102
- React.useEffect(function () {
101
+ useEffect(function () {
103
102
  props.fileList && setFileList(props.fileList);
104
103
  }, [props.fileList]);
105
- React.useEffect(function () {
104
+ useEffect(function () {
106
105
  return abort;
107
106
  }, []);
108
107
  var onClick = function onClick(e) {
@@ -122,20 +121,22 @@ var InternalUpload = function InternalUpload(props, ref) {
122
121
  });
123
122
  };
124
123
  var uploadFiles = function uploadFiles(files) {
125
- var _context2;
126
- files.forEach(function (file) {
127
- file.originFileObj = new File([file], file.name, {
128
- type: file.type
124
+ if (Array.isArray(files) && files.length) {
125
+ var _context2;
126
+ files.forEach(function (file) {
127
+ file.originFileObj = new File([file], file.name, {
128
+ type: file.type
129
+ });
130
+ file.uid = getUid();
131
+ file.status = 'notStart';
132
+ file.fileName = allProps.name || file.name;
129
133
  });
130
- file.uid = getUid();
131
- file.status = 'notStart';
132
- file.fileName = allProps.name || file.name;
133
- });
134
- var newFileList = _concatInstanceProperty(_context2 = []).call(_context2, _toConsumableArray(fileList), _toConsumableArray(files));
135
- files.forEach(function (file) {
136
- props.fileList === undefined && setFileList(fileList);
137
- upload(file, newFileList);
138
- });
134
+ var newFileList = _concatInstanceProperty(_context2 = []).call(_context2, _toConsumableArray(fileList), _toConsumableArray(files));
135
+ files.forEach(function (file) {
136
+ props.fileList === undefined && setFileList(fileList);
137
+ upload(file, newFileList);
138
+ });
139
+ }
139
140
  };
140
141
  var upload = function upload(file, fileList) {
141
142
  if (props.beforeUpload) {
@@ -264,40 +265,53 @@ var InternalUpload = function InternalUpload(props, ref) {
264
265
  });
265
266
  });
266
267
  };
267
- var handleRemove = function handleRemove(file, e) {
268
- e.preventDefault();
269
- var files = _filterInstanceProperty(fileList).call(fileList, function (fileItem) {
270
- return fileItem.uid !== file.uid;
271
- });
272
- if (onRemove) {
273
- var remove = onRemove(file);
274
- if (remove && typeof remove !== 'boolean' && remove.then) {
275
- remove.then(function (flag) {
276
- if (flag) {
277
- onFileListChange(file, files);
278
- abort(file);
279
- }
280
- }).catch(function (e) {
281
- console.log(e);
282
- });
283
- } else if (remove !== false) {
268
+ var handleRemove = function handleRemove(originFile) {
269
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
270
+ if (e) {
271
+ e.preventDefault();
272
+ }
273
+ if (originFile) {
274
+ var file = _extends(_extends({}, originFile), {
275
+ status: 'removed'
276
+ });
277
+ var files = _filterInstanceProperty(fileList).call(fileList, function (fileItem) {
278
+ return fileItem.uid !== file.uid;
279
+ });
280
+ if (onRemove) {
281
+ var remove = onRemove(file);
282
+ if (remove && typeof remove !== 'boolean' && remove.then) {
283
+ remove.then(function (flag) {
284
+ if (flag) {
285
+ onFileListChange(file, files);
286
+ abort(file);
287
+ }
288
+ }).catch(function (e) {
289
+ console.log(e);
290
+ });
291
+ } else if (remove !== false) {
292
+ onFileListChange(file, files);
293
+ abort(file);
294
+ }
295
+ } else {
284
296
  onFileListChange(file, files);
285
297
  abort(file);
286
298
  }
287
- } else {
288
- onFileListChange(file, files);
289
- abort(file);
290
299
  }
291
300
  };
292
- var handleReUpload = function handleReUpload(file, e) {
293
- e.preventDefault();
294
- file.percent = 0;
295
- file.status = 'uploading';
296
- var files = _mapInstanceProperty(fileList).call(fileList, function (fileItem) {
297
- return fileItem.uid === file.uid ? file : fileItem;
298
- });
299
- onFileListChange(file, files);
300
- upload(file, files);
301
+ var handleReUpload = function handleReUpload(file) {
302
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
303
+ if (e) {
304
+ e.preventDefault();
305
+ }
306
+ if (file) {
307
+ file.percent = 0;
308
+ file.status = 'uploading';
309
+ var files = _mapInstanceProperty(fileList).call(fileList, function (fileItem) {
310
+ return fileItem.uid === file.uid ? file : fileItem;
311
+ });
312
+ onFileListChange(file, files);
313
+ upload(file, files);
314
+ }
301
315
  };
302
316
  var prefixCls = getPrefixCls(pkgPrefixCls, 'upload', customPrefixcls);
303
317
  var inputFileProps = {
@@ -310,10 +324,10 @@ var InternalUpload = function InternalUpload(props, ref) {
310
324
  webkitdirectory: directory ? 'webkitdirectory' : undefined
311
325
  };
312
326
  var dragEvents = {};
313
- var _React$useState3 = React.useState(false),
314
- _React$useState4 = _slicedToArray(_React$useState3, 2),
315
- hover = _React$useState4[0],
316
- setHover = _React$useState4[1];
327
+ var _useState3 = useState(false),
328
+ _useState4 = _slicedToArray(_useState3, 2),
329
+ hover = _useState4[0],
330
+ setHover = _useState4[1];
317
331
  if (type === 'drag') {
318
332
  var onFileDrop = function onFileDrop(e) {
319
333
  e.preventDefault();
@@ -349,7 +363,7 @@ var InternalUpload = function InternalUpload(props, ref) {
349
363
  dragEvents.onDragOver = onFileLeave;
350
364
  dragEvents.onDragLeave = onFileLeave;
351
365
  }
352
- React.useEffect(function () {
366
+ useEffect(function () {
353
367
  if (type === 'drag') {
354
368
  var stopDrop = function stopDrop(e) {
355
369
  return e.preventDefault();
@@ -362,6 +376,16 @@ var InternalUpload = function InternalUpload(props, ref) {
362
376
  };
363
377
  }
364
378
  }, [type]);
379
+ useImperativeHandle(ref, function () {
380
+ return {
381
+ fileList: fileList,
382
+ uploadFiles: uploadFiles,
383
+ reUploadFile: handleReUpload,
384
+ removeFile: handleRemove,
385
+ abortFile: abort,
386
+ input: inputRef.current
387
+ };
388
+ });
365
389
  return /*#__PURE__*/React.createElement("div", {
366
390
  className: classNames(prefixCls, {
367
391
  disabled: disabled
@@ -377,7 +401,7 @@ var InternalUpload = function InternalUpload(props, ref) {
377
401
  title: "",
378
402
  type: "file"
379
403
  }, inputFileProps, {
380
- ref: mergedRef
404
+ ref: inputRef
381
405
  })))), (listType === 'picture' || !(listType === 'text' && (!showUploadList || !fileList.length))) && /*#__PURE__*/React.createElement("ul", {
382
406
  className: _concatInstanceProperty(_context6 = "".concat(prefixCls, "-")).call(_context6, listType, "-list")
383
407
  }, listType === 'picture' && hasChildren && /*#__PURE__*/React.createElement("li", {
@@ -392,7 +416,7 @@ var InternalUpload = function InternalUpload(props, ref) {
392
416
  title: "",
393
417
  type: "file"
394
418
  }, inputFileProps, {
395
- ref: mergedRef
419
+ ref: inputRef
396
420
  }))))), showUploadList && _mapInstanceProperty(fileList).call(fileList, function (file) {
397
421
  return itemRender ? itemRender( /*#__PURE__*/React.createElement(Item, _extends({}, {
398
422
  file: file,
@@ -502,6 +526,6 @@ var Item = function Item(_ref3) {
502
526
  })]
503
527
  }));
504
528
  };
505
- var Upload = /*#__PURE__*/React.forwardRef(InternalUpload);
529
+ var Upload = /*#__PURE__*/forwardRef(InternalUpload);
506
530
  Upload.displayName = 'Upload';
507
531
  export default Upload;
@@ -167,9 +167,11 @@
167
167
  }
168
168
  .kd-carousel-list-fade .kd-carousel-list-item-not-hidden {
169
169
  opacity: 1;
170
+ z-index: 1;
170
171
  }
171
172
  .kd-carousel-list-fade .kd-carousel-list-item-hidden {
172
173
  opacity: 0;
174
+ z-index: 0;
173
175
  }
174
176
  .kd-carousel-list-display {
175
177
  width: 100%;
@@ -187,6 +189,7 @@
187
189
  position: absolute;
188
190
  list-style: none;
189
191
  padding: 0;
192
+ z-index: 1;
190
193
  }
191
194
  .kd-carousel-slidebar-left {
192
195
  display: -webkit-box;
@@ -299,6 +302,7 @@
299
302
  right: 16px;
300
303
  -webkit-transform: translateY(-50%);
301
304
  transform: translateY(-50%);
305
+ z-index: 1;
302
306
  }
303
307
  .kd-carousel-jump-left {
304
308
  left: 16px;
@@ -1,6 +1,7 @@
1
1
  @import '../../style/themes/index';
2
2
  @import './mixin.less';
3
3
  @carousel-prefix-cls: ~'@{kd-prefix}-carousel';
4
+
4
5
  .@{carousel-prefix-cls} {
5
6
  &-root {
6
7
  position: relative;
@@ -27,18 +28,23 @@
27
28
 
28
29
  &-slide {
29
30
  width: 100%;
31
+
30
32
  .@{carousel-prefix-cls}-list-item {
31
33
  opacity: 1;
32
34
  border-radius: @carousel-boder-radius;
35
+
33
36
  &-animation {
34
37
  transition: opacity 0.3s ease;
35
38
  }
39
+
36
40
  &-none-animation {
37
41
  transition: none;
38
42
  }
43
+
39
44
  &-not-hidden {
40
45
  opacity: 1;
41
46
  }
47
+
42
48
  &-hidden {
43
49
  opacity: 0;
44
50
  }
@@ -47,30 +53,40 @@
47
53
 
48
54
  &-fade {
49
55
  flex: 1;
56
+
50
57
  .@{carousel-prefix-cls}-list-item {
51
58
  opacity: 1;
59
+
52
60
  &-animation {
53
61
  transition: opacity 0.3s ease;
54
62
  }
63
+
55
64
  &-none-animation {
56
65
  transition: none;
57
66
  }
67
+
58
68
  &-not-hidden {
59
69
  opacity: 1;
70
+ z-index: 1;
60
71
  }
72
+
61
73
  &-hidden {
62
74
  opacity: 0;
75
+ z-index: 0;
63
76
  }
64
77
  }
65
78
  }
66
79
 
67
80
  &-display {
68
81
  width: 100%;
82
+
69
83
  .@{carousel-prefix-cls}-list-item {
70
84
  display: block;
85
+
71
86
  &-not-hidden {
72
87
  display: block;
73
88
  }
89
+
74
90
  &-hidden {
75
91
  display: none;
76
92
  }
@@ -82,25 +98,29 @@
82
98
  position: absolute;
83
99
  list-style: none;
84
100
  padding: 0;
101
+ z-index: 1;
85
102
 
86
103
  &-left {
87
104
  .vertical;
88
105
  left: @carousel-dots-margin-left;
89
106
  }
107
+
90
108
  &-right {
91
109
  .vertical;
92
110
  right: @carousel-dots-margin-right;
93
111
  }
112
+
94
113
  &-bottom {
95
114
  .horizontal;
96
115
  bottom: @carousel-dots-margin-bottom;
97
116
  }
117
+
98
118
  &-top {
99
119
  .horizontal;
100
120
  top: @carousel-dots-margin-top;
101
121
  }
102
122
 
103
- &-dot > button {
123
+ &-dot>button {
104
124
  display: block;
105
125
  border-radius: @carousel-dots-boder-radius;
106
126
  box-sizing: border-box;
@@ -123,9 +143,11 @@
123
143
  width: 100%;
124
144
  cursor: pointer;
125
145
  outline: none;
146
+
126
147
  &-active {
127
148
  opacity: 1;
128
- & > button {
149
+
150
+ &>button {
129
151
  background-color: @carousel-dots-color-background-active;
130
152
  opacity: 1;
131
153
  }
@@ -139,6 +161,7 @@
139
161
  left: unset;
140
162
  right: 16px;
141
163
  transform: translateY(-50%);
164
+ z-index: 1;
142
165
 
143
166
  &-left {
144
167
  left: 16px;
@@ -149,7 +172,7 @@
149
172
  cursor: pointer;
150
173
  }
151
174
 
152
- > *:first-child {
175
+ >*:first-child {
153
176
  display: flex;
154
177
  align-items: center;
155
178
  justify-content: center;
@@ -173,12 +196,14 @@
173
196
  }
174
197
  }
175
198
  }
199
+
176
200
  .vertical {
177
201
  display: flex;
178
202
  flex-direction: column;
179
203
  top: 50%;
180
204
  transform: translateY(-50%);
181
- & > li {
205
+
206
+ &>li {
182
207
  margin: @carousel-dots-marigin 0;
183
208
  width: @carousel-dots-height;
184
209
  height: @carousel-dots-width;
@@ -190,7 +215,8 @@
190
215
  flex-direction: row;
191
216
  left: 50%;
192
217
  transform: translateX(-50%);
193
- & > li {
218
+
219
+ &>li {
194
220
  margin: 0 @carousel-dots-marigin;
195
221
  height: @carousel-dots-height;
196
222
  width: @carousel-dots-width;
@@ -370,8 +370,10 @@ var Cascader = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
370
370
  var value = _ref5[fieldNames.value];
371
371
  return value;
372
372
  });
373
- setCurrentOptions(selectedOptions);
374
- props.value === undefined && setValue(selectedValue);
373
+ if (typeof props.value === 'undefined') {
374
+ setCurrentOptions(selectedOptions);
375
+ setValue(selectedValue);
376
+ }
375
377
  props.onChange && props.onChange(selectedValue, selectedOptions);
376
378
  };
377
379
  var onVisibleChange = function onVisibleChange(visible) {
@@ -11,7 +11,7 @@ export interface CollapseProps {
11
11
  defaultActiveKey?: string[] | string | number[] | number;
12
12
  expandIcon?: React.ReactNode | ((props: PanelProps) => React.ReactNode);
13
13
  expandIconPosition?: IconPositionType;
14
- onChange?: () => void;
14
+ onChange?: (v: any) => void;
15
15
  style?: React.CSSProperties;
16
16
  className?: string;
17
17
  children?: React.ReactNode;
@@ -19,6 +19,7 @@ export interface DropDownProps extends PopperProps {
19
19
  children?: React.ReactNode;
20
20
  onItemClick?: (key: string) => void;
21
21
  menu: React.ReactElement | Array<MenuItem>;
22
+ menuAnimation?: boolean;
22
23
  }
23
24
  interface DropdownType extends React.ForwardRefExoticComponent<DropDownProps & React.RefAttributes<HTMLElement>> {
24
25
  Menu: typeof Menu;