amis 1.4.2-beta.1 → 1.4.2-beta.11
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/lib/Schema.d.ts +9 -2
- package/lib/Schema.js.map +1 -1
- package/lib/components/AnchorNav.d.ts +22 -21
- package/lib/components/AnchorNav.js +7 -3
- package/lib/components/AnchorNav.js.map +2 -2
- package/lib/components/ArrayInput.d.ts +84 -84
- package/lib/components/AssociatedSelection.d.ts +930 -0
- package/lib/components/AssociatedSelection.js +89 -0
- package/lib/components/AssociatedSelection.js.map +13 -0
- package/lib/components/Badge.js +2 -2
- package/lib/components/Badge.js.map +2 -2
- package/lib/components/{ChainedCheckboxes.d.ts → ChainedSelection.d.ts} +267 -98
- package/lib/components/{ChainedCheckboxes.js → ChainedSelection.js} +30 -24
- package/lib/components/ChainedSelection.js.map +13 -0
- package/lib/components/ColorPicker.d.ts +84 -84
- package/lib/components/DatePicker.d.ts +84 -84
- package/lib/components/DateRangePicker.d.ts +84 -84
- package/lib/components/Editor.d.ts +84 -84
- package/lib/components/GroupedSelection.d.ts +907 -0
- package/lib/components/GroupedSelection.js +48 -0
- package/lib/components/GroupedSelection.js.map +13 -0
- package/lib/components/Link.d.ts +29 -36
- package/lib/components/Link.js +14 -15
- package/lib/components/Link.js.map +2 -2
- package/lib/components/ListGroup.d.ts +21 -21
- package/lib/components/ModalManager.js +1 -1
- package/lib/components/ModalManager.js.map +2 -2
- package/lib/components/MonthRangePicker.d.ts +84 -84
- package/lib/components/NumberInput.d.ts +20 -20
- package/lib/components/PickerColumn.d.ts +514 -0
- package/lib/components/PickerColumn.js +279 -0
- package/lib/components/PickerColumn.js.map +13 -0
- package/lib/components/PickerContainer.d.ts +513 -0
- package/lib/components/PickerContainer.js +96 -0
- package/lib/components/PickerContainer.js.map +13 -0
- package/lib/components/Radios.d.ts +22 -21
- package/lib/components/Radios.js +1 -0
- package/lib/components/Radios.js.map +2 -2
- package/lib/components/Rating.d.ts +21 -21
- package/lib/components/ResultBox.d.ts +84 -84
- package/lib/components/SearchBox.d.ts +84 -84
- package/lib/components/SearchBox.js +4 -4
- package/lib/components/SearchBox.js.map +2 -2
- package/lib/components/Select.d.ts +245 -237
- package/lib/components/Select.js +25 -4
- package/lib/components/Select.js.map +2 -2
- package/lib/components/{Checkboxes.d.ts → Selection.d.ts} +273 -98
- package/lib/components/Selection.js +134 -0
- package/lib/components/Selection.js.map +13 -0
- package/lib/components/{TableCheckboxes.d.ts → TableSelection.d.ts} +266 -96
- package/lib/components/{TableCheckboxes.js → TableSelection.js} +30 -30
- package/lib/components/TableSelection.js.map +13 -0
- package/lib/components/Tabs.d.ts +20 -20
- package/lib/components/TabsTransfer.d.ts +84 -84
- package/lib/components/TabsTransfer.js +9 -9
- package/lib/components/TabsTransfer.js.map +2 -2
- package/lib/components/TabsTransferPicker.d.ts +489 -0
- package/lib/components/TabsTransferPicker.js +60 -0
- package/lib/components/TabsTransferPicker.js.map +13 -0
- package/lib/components/Transfer.d.ts +908 -274
- package/lib/components/Transfer.js +31 -24
- package/lib/components/Transfer.js.map +2 -2
- package/lib/components/TransferDropDown.d.ts +487 -0
- package/lib/components/TransferDropDown.js +59 -0
- package/lib/components/TransferDropDown.js.map +13 -0
- package/lib/components/TransferPicker.d.ts +489 -0
- package/lib/components/TransferPicker.js +60 -0
- package/lib/components/TransferPicker.js.map +13 -0
- package/lib/components/Tree.d.ts +84 -84
- package/lib/components/{TreeCheckboxes.d.ts → TreeSelection.d.ts} +269 -99
- package/lib/components/{TreeCheckboxes.js → TreeSelection.js} +36 -32
- package/lib/components/TreeSelection.js.map +13 -0
- package/lib/components/WithRemoteConfig.js +1 -1
- package/lib/components/WithRemoteConfig.js.map +2 -2
- package/lib/components/condition-builder/Field.js +5 -2
- package/lib/components/condition-builder/Field.js.map +2 -2
- package/lib/components/condition-builder/Func.js +2 -2
- package/lib/components/condition-builder/Func.js.map +2 -2
- package/lib/components/condition-builder/InputSwitch.js +2 -2
- package/lib/components/condition-builder/InputSwitch.js.map +2 -2
- package/lib/components/condition-builder/Item.js +3 -3
- package/lib/components/condition-builder/Item.js.map +2 -2
- package/lib/components/index.d.ts +8 -8
- package/lib/components/index.js +16 -16
- package/lib/components/index.js.map +2 -2
- package/lib/envOverwrite.js.map +2 -2
- package/lib/factory.d.ts +4 -0
- package/lib/factory.js +4 -2
- package/lib/factory.js.map +2 -2
- package/lib/helper.css.map +1 -1
- package/lib/hooks/index.d.ts +5 -0
- package/lib/hooks/index.js +14 -0
- package/lib/hooks/index.js.map +13 -0
- package/lib/hooks/use-set-state.d.ts +2 -0
- package/lib/hooks/use-set-state.js +15 -0
- package/lib/hooks/use-set-state.js.map +13 -0
- package/lib/hooks/use-touch.d.ts +16 -0
- package/lib/hooks/use-touch.js +73 -0
- package/lib/hooks/use-touch.js.map +13 -0
- package/lib/hooks/use-update-effect.d.ts +3 -0
- package/lib/hooks/use-update-effect.js +17 -0
- package/lib/hooks/use-update-effect.js.map +13 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -1
- package/lib/index.js.map +2 -2
- package/lib/locale/de-DE.js +2 -0
- package/lib/locale/de-DE.js.map +2 -2
- package/lib/locale/en-US.js +2 -0
- package/lib/locale/en-US.js.map +2 -2
- package/lib/locale/zh-CN.js +4 -2
- package/lib/locale/zh-CN.js.map +2 -2
- package/lib/renderers/Action.d.ts +4 -3
- package/lib/renderers/Action.js +17 -4
- package/lib/renderers/Action.js.map +2 -2
- package/lib/renderers/AnchorNav.d.ts +1 -0
- package/lib/renderers/AnchorNav.js +2 -2
- package/lib/renderers/AnchorNav.js.map +2 -2
- package/lib/renderers/Avatar.js +3 -3
- package/lib/renderers/Avatar.js.map +2 -2
- package/lib/renderers/Breadcrumb.js +1 -1
- package/lib/renderers/Breadcrumb.js.map +2 -2
- package/lib/renderers/CRUD.d.ts +9 -0
- package/lib/renderers/CRUD.js +24 -4
- package/lib/renderers/CRUD.js.map +2 -2
- package/lib/renderers/Card.d.ts +4 -0
- package/lib/renderers/Card.js +29 -23
- package/lib/renderers/Card.js.map +2 -2
- package/lib/renderers/Chart.js +1 -1
- package/lib/renderers/Chart.js.map +2 -2
- package/lib/renderers/Collapse.js +3 -2
- package/lib/renderers/Collapse.js.map +2 -2
- package/lib/renderers/DropDownButton.js +1 -1
- package/lib/renderers/DropDownButton.js.map +2 -2
- package/lib/renderers/Form/DiffEditor.d.ts +4 -3
- package/lib/renderers/Form/Editor.d.ts +3 -2
- package/lib/renderers/Form/InputCity.d.ts +84 -84
- package/lib/renderers/Form/InputCity.js +7 -6
- package/lib/renderers/Form/InputCity.js.map +2 -2
- package/lib/renderers/Form/InputColor.d.ts +84 -84
- package/lib/renderers/Form/InputFile.js +10 -4
- package/lib/renderers/Form/InputFile.js.map +2 -2
- package/lib/renderers/Form/InputImage.js +11 -4
- package/lib/renderers/Form/InputImage.js.map +2 -2
- package/lib/renderers/Form/Item.d.ts +1 -1
- package/lib/renderers/Form/Item.js.map +1 -1
- package/lib/renderers/Form/Options.js +13 -3
- package/lib/renderers/Form/Options.js.map +2 -2
- package/lib/renderers/Form/Select.d.ts +41 -4
- package/lib/renderers/Form/Select.js +23 -3
- package/lib/renderers/Form/Select.js.map +2 -2
- package/lib/renderers/Form/TabsTransferPicker.d.ts +48 -0
- package/lib/renderers/Form/TabsTransferPicker.js +29 -0
- package/lib/renderers/Form/TabsTransferPicker.js.map +13 -0
- package/lib/renderers/Form/Transfer.js +3 -2
- package/lib/renderers/Form/Transfer.js.map +2 -2
- package/lib/renderers/Form/TransferPicker.d.ts +48 -0
- package/lib/renderers/Form/TransferPicker.js +29 -0
- package/lib/renderers/Form/TransferPicker.js.map +13 -0
- package/lib/renderers/Form/TreeSelect.js +2 -2
- package/lib/renderers/Form/TreeSelect.js.map +2 -2
- package/lib/renderers/Form/index.js +1 -1
- package/lib/renderers/Form/index.js.map +2 -2
- package/lib/renderers/Form/wrapControl.js +13 -1
- package/lib/renderers/Form/wrapControl.js.map +2 -2
- package/lib/renderers/IFrame.js +1 -3
- package/lib/renderers/IFrame.js.map +2 -2
- package/lib/renderers/Json.d.ts +4 -0
- package/lib/renderers/Json.js +4 -13
- package/lib/renderers/Json.js.map +2 -2
- package/lib/renderers/Link.d.ts +4 -2
- package/lib/renderers/Link.js +15 -6
- package/lib/renderers/Link.js.map +2 -2
- package/lib/renderers/List.js +1 -1
- package/lib/renderers/List.js.map +2 -2
- package/lib/renderers/Mapping.d.ts +9 -2
- package/lib/renderers/Mapping.js +18 -6
- package/lib/renderers/Mapping.js.map +2 -2
- package/lib/renderers/Nav.d.ts +21 -21
- package/lib/renderers/Nav.js +39 -21
- package/lib/renderers/Nav.js.map +2 -2
- package/lib/renderers/Portlet.d.ts +125 -0
- package/lib/renderers/Portlet.js +156 -0
- package/lib/renderers/Portlet.js.map +13 -0
- package/lib/renderers/Property.js +2 -1
- package/lib/renderers/Property.js.map +2 -2
- package/lib/renderers/SearchBox.d.ts +6 -1
- package/lib/renderers/SearchBox.js +19 -5
- package/lib/renderers/SearchBox.js.map +2 -2
- package/lib/renderers/Table/TableContent.d.ts +4 -1
- package/lib/renderers/Table/TableContent.js +21 -1
- package/lib/renderers/Table/TableContent.js.map +2 -2
- package/lib/renderers/Table/index.d.ts +5 -1
- package/lib/renderers/Table/index.js +64 -29
- package/lib/renderers/Table/index.js.map +2 -2
- package/lib/renderers/Tabs.js +9 -1
- package/lib/renderers/Tabs.js.map +2 -2
- package/lib/renderers/WebComponent.js +1 -1
- package/lib/renderers/WebComponent.js.map +2 -2
- package/lib/store/combo.d.ts +2 -16
- package/lib/store/crud.js +3 -7
- package/lib/store/crud.js.map +2 -2
- package/lib/store/form.d.ts +1 -1
- package/lib/store/form.js +5 -6
- package/lib/store/form.js.map +2 -2
- package/lib/store/service.js +5 -4
- package/lib/store/service.js.map +2 -2
- package/lib/store/table.d.ts +2 -2
- package/lib/themes/ang-ie11.css +422 -149
- package/lib/themes/ang.css +422 -149
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +422 -149
- package/lib/themes/antd.css +422 -149
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +456 -182
- package/lib/themes/cxd.css +456 -182
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +422 -149
- package/lib/themes/dark.css +422 -149
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default.css +456 -182
- package/lib/themes/default.css.map +1 -1
- package/lib/types.d.ts +37 -0
- package/lib/types.js +0 -5
- package/lib/types.js.map +2 -2
- package/lib/utils/api.d.ts +3 -2
- package/lib/utils/api.js +28 -12
- package/lib/utils/api.js.map +2 -2
- package/lib/utils/dom.d.ts +4 -0
- package/lib/utils/dom.js +11 -1
- package/lib/utils/dom.js.map +2 -2
- package/lib/utils/helper.d.ts +2 -0
- package/lib/utils/helper.js +11 -2
- package/lib/utils/helper.js.map +2 -2
- package/lib/utils/icon.js +3 -0
- package/lib/utils/icon.js.map +2 -2
- package/package.json +1 -1
- package/schema.json +3038 -790
- package/scss/_mixins.scss +1 -3
- package/scss/_properties.scss +25 -1
- package/scss/base/_normalize.scss +2 -0
- package/scss/components/_anchor-nav.scss +88 -29
- package/scss/components/_card.scss +8 -14
- package/scss/components/_collapse.scss +16 -1
- package/scss/components/_mapping.scss +6 -0
- package/scss/components/_nav.scss +1 -1
- package/scss/components/_picker-columns.scss +123 -0
- package/scss/components/_popover.scss +17 -0
- package/scss/components/_portlet.scss +51 -0
- package/scss/components/_status.scss +1 -1
- package/scss/components/_table.scss +26 -0
- package/scss/components/form/_checks.scss +0 -351
- package/scss/components/form/_fieldset.scss +5 -1
- package/scss/components/form/_selection.scss +354 -0
- package/scss/components/form/_transfer.scss +75 -18
- package/scss/themes/_common.scss +4 -0
- package/scss/themes/_cxd-variables.scss +4 -1
- package/scss/themes/cxd.scss +16 -12
- package/sdk/ang-ie11.css +457 -152
- package/sdk/ang.css +480 -154
- package/sdk/antd-ie11.css +456 -151
- package/sdk/antd.css +480 -154
- package/sdk/charts.js +13 -13
- package/sdk/color-picker.js +65 -69
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +496 -194
- package/sdk/cxd.css +517 -190
- package/sdk/dark-ie11.css +457 -152
- package/sdk/dark.css +480 -154
- package/sdk/exceljs.js +1 -1
- package/sdk/helper.css.map +1 -1
- package/sdk/locale/de-DE.js +2 -0
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +20 -28
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +496 -194
- package/sdk/sdk.css +517 -190
- package/sdk/sdk.js +1268 -1236
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +57 -57
- package/src/Schema.ts +14 -0
- package/src/components/AnchorNav.tsx +15 -4
- package/src/components/{AssociatedCheckboxes.tsx → AssociatedSelection.tsx} +41 -37
- package/src/components/Badge.tsx +3 -3
- package/src/components/{ChainedCheckboxes.tsx → ChainedSelection.tsx} +57 -40
- package/src/components/{ListCheckboxes.tsx → GroupedSelection.tsx} +26 -21
- package/src/components/Link.tsx +28 -37
- package/src/components/ModalManager.ts +1 -1
- package/src/components/PickerColumn.tsx +429 -0
- package/src/components/PickerContainer.tsx +128 -0
- package/src/components/Radios.tsx +3 -8
- package/src/components/SearchBox.tsx +4 -5
- package/src/components/Select.tsx +57 -5
- package/src/components/{Checkboxes.tsx → Selection.tsx} +75 -21
- package/src/components/{TableCheckboxes.tsx → TableSelection.tsx} +46 -25
- package/src/components/TabsTransfer.tsx +13 -7
- package/src/components/TabsTransferPicker.tsx +85 -0
- package/src/components/Transfer.tsx +71 -50
- package/src/components/TransferDropDown.tsx +117 -0
- package/src/components/TransferPicker.tsx +84 -0
- package/src/components/{TreeCheckboxes.tsx → TreeSelection.tsx} +33 -26
- package/src/components/WithRemoteConfig.tsx +7 -2
- package/src/components/condition-builder/Field.tsx +5 -5
- package/src/components/condition-builder/Func.tsx +3 -3
- package/src/components/condition-builder/InputSwitch.tsx +3 -3
- package/src/components/condition-builder/Item.tsx +5 -12
- package/src/components/index.tsx +13 -13
- package/src/envOverwrite.ts +0 -1
- package/src/factory.tsx +18 -3
- package/src/hooks/index.ts +5 -0
- package/src/hooks/use-set-state.ts +19 -0
- package/src/hooks/use-touch.ts +100 -0
- package/src/hooks/use-update-effect.ts +16 -0
- package/src/index.tsx +3 -0
- package/src/locale/de-DE.ts +2 -0
- package/src/locale/en-US.ts +2 -0
- package/src/locale/zh-CN.ts +4 -2
- package/src/renderers/Action.tsx +28 -2
- package/src/renderers/AnchorNav.tsx +4 -0
- package/src/renderers/Avatar.tsx +8 -4
- package/src/renderers/Breadcrumb.tsx +5 -1
- package/src/renderers/CRUD.tsx +33 -3
- package/src/renderers/Card.tsx +63 -34
- package/src/renderers/Chart.tsx +6 -2
- package/src/renderers/Collapse.tsx +4 -2
- package/src/renderers/DropDownButton.tsx +1 -1
- package/src/renderers/Form/InputCity.tsx +4 -8
- package/src/renderers/Form/InputFile.tsx +29 -20
- package/src/renderers/Form/InputImage.tsx +11 -3
- package/src/renderers/Form/Item.tsx +1 -1
- package/src/renderers/Form/Options.tsx +16 -2
- package/src/renderers/Form/Select.tsx +144 -21
- package/src/renderers/Form/TabsTransferPicker.tsx +123 -0
- package/src/renderers/Form/Transfer.tsx +3 -2
- package/src/renderers/Form/TransferPicker.tsx +123 -0
- package/src/renderers/Form/TreeSelect.tsx +25 -0
- package/src/renderers/Form/index.tsx +1 -1
- package/src/renderers/Form/wrapControl.tsx +26 -1
- package/src/renderers/IFrame.tsx +2 -4
- package/src/renderers/Json.tsx +9 -9
- package/src/renderers/Link.tsx +27 -13
- package/src/renderers/List.tsx +1 -1
- package/src/renderers/Mapping.tsx +27 -11
- package/src/renderers/Nav.tsx +108 -60
- package/src/renderers/Portlet.tsx +423 -0
- package/src/renderers/Property.tsx +3 -2
- package/src/renderers/SearchBox.tsx +23 -4
- package/src/renderers/Table/TableContent.tsx +40 -2
- package/src/renderers/Table/index.tsx +87 -41
- package/src/renderers/Tabs.tsx +9 -1
- package/src/renderers/WebComponent.tsx +2 -2
- package/src/store/crud.ts +3 -8
- package/src/store/form.ts +5 -10
- package/src/store/service.ts +5 -4
- package/src/types.ts +57 -0
- package/src/utils/api.ts +40 -20
- package/src/utils/dom.tsx +12 -0
- package/src/utils/helper.ts +8 -0
- package/src/utils/icon.tsx +4 -0
- package/dump.rdb +0 -0
- package/lib/components/AssociatedCheckboxes.d.ts +0 -762
- package/lib/components/AssociatedCheckboxes.js +0 -90
- package/lib/components/AssociatedCheckboxes.js.map +0 -13
- package/lib/components/ChainedCheckboxes.js.map +0 -13
- package/lib/components/Checkboxes.js +0 -101
- package/lib/components/Checkboxes.js.map +0 -13
- package/lib/components/ListCheckboxes.d.ts +0 -739
- package/lib/components/ListCheckboxes.js +0 -48
- package/lib/components/ListCheckboxes.js.map +0 -13
- package/lib/components/ListRadios.d.ts +0 -763
- package/lib/components/ListRadios.js +0 -86
- package/lib/components/ListRadios.js.map +0 -13
- package/lib/components/TableCheckboxes.js.map +0 -13
- package/lib/components/TreeCheckboxes.js.map +0 -13
- package/lib/components/TreeRadios.d.ts +0 -838
- package/lib/components/TreeRadios.js +0 -116
- package/lib/components/TreeRadios.js.map +0 -13
- package/src/components/ListRadios.tsx +0 -159
- package/src/components/TreeRadios.tsx +0 -202
package/src/components/Link.tsx
CHANGED
@@ -1,22 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
3
|
-
import {BaseSchema, SchemaTpl} from '../Schema';
|
4
|
-
import {getPropValue} from '../utils/helper';
|
5
|
-
import {filter} from '../utils/tpl';
|
6
|
-
import {themeable} from '../theme';
|
2
|
+
import {themeable, ThemeProps} from '../theme';
|
7
3
|
import {autobind} from '../utils/helper';
|
4
|
+
import {generateIcon} from '../utils/icon';
|
8
5
|
|
9
|
-
export interface
|
10
|
-
|
11
|
-
|
12
|
-
*/
|
13
|
-
blank?: boolean;
|
14
|
-
|
15
|
-
/**
|
16
|
-
* 链接内容,如果不配置将显示链接地址。
|
17
|
-
*/
|
18
|
-
body?: SchemaTpl;
|
19
|
-
|
6
|
+
export interface LinkProps
|
7
|
+
extends ThemeProps,
|
8
|
+
React.DOMAttributes<HTMLAnchorElement> {
|
20
9
|
/**
|
21
10
|
* 禁用
|
22
11
|
*/
|
@@ -28,14 +17,15 @@ export interface LinkSchema extends BaseSchema {
|
|
28
17
|
icon?: string;
|
29
18
|
|
30
19
|
/**
|
31
|
-
*
|
20
|
+
* 右侧图标
|
32
21
|
*/
|
33
|
-
|
34
|
-
}
|
22
|
+
rightIcon?: string;
|
35
23
|
|
36
|
-
|
37
|
-
|
38
|
-
|
24
|
+
href?: string;
|
25
|
+
htmlTarget?: string;
|
26
|
+
title?: string;
|
27
|
+
children?: JSX.Element;
|
28
|
+
}
|
39
29
|
|
40
30
|
export class Link extends React.Component<LinkProps, object> {
|
41
31
|
constructor(props: LinkProps) {
|
@@ -43,36 +33,37 @@ export class Link extends React.Component<LinkProps, object> {
|
|
43
33
|
}
|
44
34
|
|
45
35
|
@autobind
|
46
|
-
|
47
|
-
const {disabled} = this.props;
|
36
|
+
handleClick(e: React.MouseEvent<any>) {
|
37
|
+
const {disabled, onClick} = this.props;
|
48
38
|
if (disabled) {
|
49
39
|
e.preventDefault();
|
50
40
|
e.stopPropagation();
|
41
|
+
return;
|
51
42
|
}
|
43
|
+
onClick?.(e);
|
52
44
|
}
|
53
45
|
|
54
46
|
render() {
|
55
47
|
const {
|
56
48
|
className,
|
57
|
-
body,
|
58
49
|
href,
|
59
50
|
classnames: cx,
|
60
|
-
blank,
|
61
51
|
disabled,
|
62
52
|
htmlTarget,
|
63
|
-
data,
|
64
53
|
title,
|
65
54
|
icon,
|
66
|
-
|
55
|
+
rightIcon,
|
56
|
+
children,
|
57
|
+
classPrefix,
|
58
|
+
theme,
|
59
|
+
...rest
|
67
60
|
} = this.props;
|
68
61
|
|
69
|
-
let value = getPropValue(this.props);
|
70
|
-
const finnalHref = href ? filter(href, data, '| raw') : '';
|
71
|
-
|
72
62
|
return (
|
73
63
|
<a
|
74
|
-
|
75
|
-
|
64
|
+
{...rest}
|
65
|
+
href={href}
|
66
|
+
target={htmlTarget}
|
76
67
|
className={cx(
|
77
68
|
`Link`,
|
78
69
|
{
|
@@ -81,11 +72,11 @@ export class Link extends React.Component<LinkProps, object> {
|
|
81
72
|
className
|
82
73
|
)}
|
83
74
|
title={title}
|
84
|
-
onClick={this.
|
75
|
+
onClick={this.handleClick}
|
85
76
|
>
|
86
|
-
|
87
|
-
{
|
88
|
-
|
77
|
+
{icon ? generateIcon(cx, icon, 'Link-icon') : null}
|
78
|
+
{children}
|
79
|
+
{rightIcon ? generateIcon(cx, rightIcon, 'Link-icon') : null}
|
89
80
|
</a>
|
90
81
|
);
|
91
82
|
}
|
@@ -0,0 +1,429 @@
|
|
1
|
+
/**
|
2
|
+
* @file Picker
|
3
|
+
* @description 移动端选择器
|
4
|
+
*/
|
5
|
+
import React, {
|
6
|
+
useEffect,
|
7
|
+
useMemo,
|
8
|
+
useRef,
|
9
|
+
useImperativeHandle,
|
10
|
+
useCallback,
|
11
|
+
forwardRef,
|
12
|
+
CSSProperties
|
13
|
+
} from 'react';
|
14
|
+
import isObject from 'lodash/isObject';
|
15
|
+
import cloneDeep from 'lodash/cloneDeep';
|
16
|
+
import {uncontrollable} from 'uncontrollable';
|
17
|
+
|
18
|
+
import {useSetState, useUpdateEffect} from '../hooks';
|
19
|
+
import {range} from '../utils/helper';
|
20
|
+
import {themeable, ThemeProps} from '../theme';
|
21
|
+
import {localeable, LocaleProps} from '../locale';
|
22
|
+
import useTouch from '../hooks/use-touch';
|
23
|
+
import {Button} from '.';
|
24
|
+
|
25
|
+
export interface PickerColumnProps extends ThemeProps, LocaleProps {
|
26
|
+
mobileClassName?: string;
|
27
|
+
style?: CSSProperties;
|
28
|
+
index?: number;
|
29
|
+
labelField: string;
|
30
|
+
readonly?: boolean;
|
31
|
+
value: any;
|
32
|
+
swipeDuration?: number | string;
|
33
|
+
visibleItemCount?: number | string;
|
34
|
+
options?: PickerOption[];
|
35
|
+
children?: any;
|
36
|
+
optionRender?: (option: string | object | PickerOption) => React.ReactNode;
|
37
|
+
onChange?: (
|
38
|
+
value?: PickerOption | string,
|
39
|
+
index?: number,
|
40
|
+
confirm?: boolean
|
41
|
+
) => void;
|
42
|
+
onClose?: () => void;
|
43
|
+
onConfirm?: () => void;
|
44
|
+
}
|
45
|
+
|
46
|
+
export interface Column {
|
47
|
+
values?: string[];
|
48
|
+
className?: string;
|
49
|
+
children?: Column[];
|
50
|
+
disabled?: boolean;
|
51
|
+
}
|
52
|
+
|
53
|
+
export type PickerOption = string | number | PickerObjectOption;
|
54
|
+
|
55
|
+
export type PickerObjectOption = {
|
56
|
+
value?: string | number;
|
57
|
+
text?: string | number;
|
58
|
+
disabled?: boolean;
|
59
|
+
} & Record<string, {}>;
|
60
|
+
|
61
|
+
const DEFAULT_DURATION = 200;
|
62
|
+
const MOMENTUM_LIMIT_TIME = 300;
|
63
|
+
const MOMENTUM_LIMIT_DISTANCE = 15;
|
64
|
+
|
65
|
+
function getElementTranslateY(element: HTMLElement | null) {
|
66
|
+
if (!element) {
|
67
|
+
return 0;
|
68
|
+
}
|
69
|
+
const style = window.getComputedStyle(element);
|
70
|
+
const transform = style.transform || style.webkitTransform;
|
71
|
+
// 格式如:matrix( scaleX(), skewY(), skewX(), scaleY(), translateX(), translateY() );
|
72
|
+
const translateY = transform.slice(7, transform.length - 1).split(', ')[5];
|
73
|
+
|
74
|
+
return Number(translateY);
|
75
|
+
}
|
76
|
+
|
77
|
+
function isOptionDisabled(option: PickerOption) {
|
78
|
+
return isObject(option) && option.disabled;
|
79
|
+
}
|
80
|
+
|
81
|
+
const PickerColumn = forwardRef<{}, PickerColumnProps>((props, ref) => {
|
82
|
+
const {
|
83
|
+
onClose,
|
84
|
+
onConfirm,
|
85
|
+
mobileClassName,
|
86
|
+
visibleItemCount = 5,
|
87
|
+
value,
|
88
|
+
swipeDuration = 1000,
|
89
|
+
labelField = 'value',
|
90
|
+
translate: __,
|
91
|
+
options = [],
|
92
|
+
classnames: cx
|
93
|
+
} = props;
|
94
|
+
let itemHeight = 24;
|
95
|
+
|
96
|
+
const defaultIndex = options.findIndex(item => item === value);
|
97
|
+
|
98
|
+
const root = useRef(null);
|
99
|
+
const menuItemRef = useRef(null);
|
100
|
+
const wrapper = useRef(null);
|
101
|
+
|
102
|
+
const moving = useRef(false);
|
103
|
+
const startOffset = useRef(0);
|
104
|
+
const transitionEndTrigger = useRef(null);
|
105
|
+
const touchStartTime = useRef(0);
|
106
|
+
const momentumOffset = useRef(0);
|
107
|
+
|
108
|
+
if (menuItemRef.current) {
|
109
|
+
//@ts-ignore
|
110
|
+
itemHeight = menuItemRef.current.getBoundingClientRect().height;
|
111
|
+
}
|
112
|
+
|
113
|
+
const [state, updateState] = useSetState({
|
114
|
+
index: defaultIndex,
|
115
|
+
offset: 0,
|
116
|
+
duration: 0,
|
117
|
+
options: cloneDeep(options)
|
118
|
+
});
|
119
|
+
|
120
|
+
const touch = useTouch();
|
121
|
+
|
122
|
+
const count = state.options.length;
|
123
|
+
|
124
|
+
const baseOffset = useMemo(() => {
|
125
|
+
// 默认转入第一个选项的位置
|
126
|
+
return (itemHeight * (+visibleItemCount - 1)) / 2;
|
127
|
+
}, [itemHeight, visibleItemCount]);
|
128
|
+
|
129
|
+
const adjustIndex = (index: number) => {
|
130
|
+
index = range(index, 0, count);
|
131
|
+
if (!state.options) {
|
132
|
+
return;
|
133
|
+
}
|
134
|
+
|
135
|
+
for (let i = index; i < count; i += 1) {
|
136
|
+
if (!isOptionDisabled(state.options[i])) return i;
|
137
|
+
}
|
138
|
+
for (let i = index - 1; i >= 0; i -= 1) {
|
139
|
+
if (!isOptionDisabled(state.options[i])) return i;
|
140
|
+
}
|
141
|
+
|
142
|
+
return null;
|
143
|
+
};
|
144
|
+
|
145
|
+
/**
|
146
|
+
*
|
147
|
+
* @param index 索引
|
148
|
+
* @param emitChange 是否派发变动消息
|
149
|
+
* @param confirm 是否为确认类型,为真时触发value改变
|
150
|
+
*/
|
151
|
+
const setIndex = (index: number, emitChange?: boolean, confirm?: boolean) => {
|
152
|
+
index = adjustIndex(index) || 0;
|
153
|
+
|
154
|
+
const offset = -index * itemHeight;
|
155
|
+
const trigger = () => {
|
156
|
+
updateState({index});
|
157
|
+
|
158
|
+
if (emitChange && props.onChange) {
|
159
|
+
setTimeout(() => {
|
160
|
+
props.onChange?.(options[index], index, confirm);
|
161
|
+
}, 0);
|
162
|
+
}
|
163
|
+
};
|
164
|
+
|
165
|
+
// trigger the change event after transitionend when moving
|
166
|
+
if (moving.current && offset !== state.offset) {
|
167
|
+
//@ts-ignore
|
168
|
+
transitionEndTrigger.current = trigger;
|
169
|
+
} else {
|
170
|
+
trigger();
|
171
|
+
}
|
172
|
+
updateState({offset});
|
173
|
+
};
|
174
|
+
|
175
|
+
const setOptions = (options: Array<PickerOption>) => {
|
176
|
+
if (JSON.stringify(options) !== JSON.stringify(state.options)) {
|
177
|
+
updateState({options});
|
178
|
+
setIndex(defaultIndex, true);
|
179
|
+
}
|
180
|
+
};
|
181
|
+
|
182
|
+
const onClickItem = (index: number) => {
|
183
|
+
if (moving.current || props.readonly) {
|
184
|
+
return;
|
185
|
+
}
|
186
|
+
transitionEndTrigger.current = null;
|
187
|
+
updateState({duration: DEFAULT_DURATION});
|
188
|
+
setIndex(index, true, true);
|
189
|
+
};
|
190
|
+
|
191
|
+
const getOptionText = (option: [] | PickerOption) => {
|
192
|
+
if (isObject(option) && props.labelField in option) {
|
193
|
+
//@ts-ignore
|
194
|
+
return option[labelField];
|
195
|
+
}
|
196
|
+
return option;
|
197
|
+
};
|
198
|
+
|
199
|
+
const getIndexByOffset = (offset: number) =>
|
200
|
+
range(Math.round(-offset / itemHeight), 0, count - 1);
|
201
|
+
|
202
|
+
const momentum = (distance: number, duration: number) => {
|
203
|
+
const speed = Math.abs(distance / duration);
|
204
|
+
|
205
|
+
distance = state.offset + (speed / 0.003) * (distance < 0 ? -1 : 1);
|
206
|
+
|
207
|
+
const index = getIndexByOffset(distance);
|
208
|
+
updateState({duration: +swipeDuration});
|
209
|
+
setIndex(index, true);
|
210
|
+
};
|
211
|
+
|
212
|
+
const stopMomentum = () => {
|
213
|
+
moving.current = false;
|
214
|
+
updateState({duration: 0});
|
215
|
+
|
216
|
+
if (transitionEndTrigger.current) {
|
217
|
+
//@ts-ignore
|
218
|
+
transitionEndTrigger.current();
|
219
|
+
transitionEndTrigger.current = null;
|
220
|
+
}
|
221
|
+
};
|
222
|
+
|
223
|
+
const onTouchStart = (event: any) => {
|
224
|
+
if (props.readonly) {
|
225
|
+
return;
|
226
|
+
}
|
227
|
+
|
228
|
+
touch.start(event);
|
229
|
+
let {offset} = state;
|
230
|
+
|
231
|
+
if (moving.current) {
|
232
|
+
const translateY = getElementTranslateY(wrapper.current);
|
233
|
+
offset = Math.min(0, translateY - baseOffset);
|
234
|
+
startOffset.current = offset;
|
235
|
+
} else {
|
236
|
+
startOffset.current = offset;
|
237
|
+
}
|
238
|
+
|
239
|
+
updateState({duration: 0, offset});
|
240
|
+
touchStartTime.current = Date.now();
|
241
|
+
momentumOffset.current = startOffset.current;
|
242
|
+
transitionEndTrigger.current = null;
|
243
|
+
};
|
244
|
+
|
245
|
+
const onTouchMove = (event: TouchEvent | React.TouchEvent) => {
|
246
|
+
if (props.readonly) {
|
247
|
+
return;
|
248
|
+
}
|
249
|
+
|
250
|
+
touch.move(event as TouchEvent);
|
251
|
+
|
252
|
+
if (touch.isVertical()) {
|
253
|
+
moving.current = true;
|
254
|
+
}
|
255
|
+
|
256
|
+
const offset = range(
|
257
|
+
startOffset.current + touch.deltaY,
|
258
|
+
-(count * itemHeight),
|
259
|
+
itemHeight
|
260
|
+
);
|
261
|
+
|
262
|
+
updateState({
|
263
|
+
offset
|
264
|
+
});
|
265
|
+
|
266
|
+
const now = Date.now();
|
267
|
+
if (now - touchStartTime.current > MOMENTUM_LIMIT_TIME) {
|
268
|
+
touchStartTime.current = now;
|
269
|
+
momentumOffset.current = offset;
|
270
|
+
}
|
271
|
+
};
|
272
|
+
|
273
|
+
const onTouchEnd = () => {
|
274
|
+
if (props.readonly) {
|
275
|
+
return;
|
276
|
+
}
|
277
|
+
const distance = state.offset - momentumOffset.current;
|
278
|
+
const duration = Date.now() - touchStartTime.current;
|
279
|
+
|
280
|
+
const allowMomentum =
|
281
|
+
duration < MOMENTUM_LIMIT_TIME &&
|
282
|
+
Math.abs(distance) > MOMENTUM_LIMIT_DISTANCE;
|
283
|
+
|
284
|
+
if (allowMomentum) {
|
285
|
+
momentum(distance, duration);
|
286
|
+
return;
|
287
|
+
}
|
288
|
+
|
289
|
+
const index = getIndexByOffset(state.offset);
|
290
|
+
updateState({duration: DEFAULT_DURATION});
|
291
|
+
setIndex(index, true);
|
292
|
+
|
293
|
+
// compatible with desktop scenario
|
294
|
+
// use setTimeout to skip the click event triggered after touchstart
|
295
|
+
setTimeout(() => {
|
296
|
+
moving.current = false;
|
297
|
+
}, 0);
|
298
|
+
};
|
299
|
+
|
300
|
+
const renderOptions = () => {
|
301
|
+
return state.options.map((option, index: number) => {
|
302
|
+
const text: string | PickerOption = getOptionText(option);
|
303
|
+
const disabled = isOptionDisabled(option);
|
304
|
+
|
305
|
+
const data = {
|
306
|
+
role: 'button',
|
307
|
+
key: index,
|
308
|
+
tabIndex: disabled ? -1 : 0,
|
309
|
+
className: props.classnames(`PickerColumns-columnItem`, {
|
310
|
+
'is-disabled': disabled,
|
311
|
+
'is-selected': index === state.index
|
312
|
+
}),
|
313
|
+
onClick: () => {
|
314
|
+
onClickItem(index);
|
315
|
+
}
|
316
|
+
};
|
317
|
+
|
318
|
+
const childData = {
|
319
|
+
className: 'text-ellipsis',
|
320
|
+
children: text
|
321
|
+
};
|
322
|
+
|
323
|
+
return (
|
324
|
+
<li {...data} ref={menuItemRef}>
|
325
|
+
{props.optionRender ? (
|
326
|
+
props.optionRender(option)
|
327
|
+
) : (
|
328
|
+
<div {...childData} />
|
329
|
+
)}
|
330
|
+
</li>
|
331
|
+
);
|
332
|
+
});
|
333
|
+
};
|
334
|
+
|
335
|
+
const setValue = (value: string) => {
|
336
|
+
const {options} = state;
|
337
|
+
for (let i = 0; i < options.length; i += 1) {
|
338
|
+
if (getOptionText(options[i]) === value) {
|
339
|
+
return setIndex(i);
|
340
|
+
}
|
341
|
+
}
|
342
|
+
return null;
|
343
|
+
};
|
344
|
+
|
345
|
+
const getValue = useCallback<() => PickerOption>(
|
346
|
+
() => state.options[state.index],
|
347
|
+
[state.index, state.options]
|
348
|
+
);
|
349
|
+
|
350
|
+
useEffect(() => {
|
351
|
+
setIndex(defaultIndex, true);
|
352
|
+
}, [defaultIndex]);
|
353
|
+
|
354
|
+
useUpdateEffect(() => {
|
355
|
+
setOptions(cloneDeep(options));
|
356
|
+
}, [options]);
|
357
|
+
|
358
|
+
useImperativeHandle(ref, () => ({
|
359
|
+
state,
|
360
|
+
setIndex,
|
361
|
+
getValue,
|
362
|
+
setValue,
|
363
|
+
setOptions,
|
364
|
+
stopMomentum
|
365
|
+
}));
|
366
|
+
|
367
|
+
const wrapperStyle = {
|
368
|
+
transform: `translate3d(0, ${state.offset + baseOffset}px, 0)`,
|
369
|
+
transitionDuration: `${state.duration}ms`,
|
370
|
+
transitionProperty: state.duration ? 'all' : 'none'
|
371
|
+
};
|
372
|
+
|
373
|
+
const wrapHeight = itemHeight * +visibleItemCount;
|
374
|
+
const frameStyle = {height: `${itemHeight}px`};
|
375
|
+
const columnsStyle = {height: `${wrapHeight}px`};
|
376
|
+
const maskStyle = {
|
377
|
+
backgroundSize: `100% ${(wrapHeight - itemHeight) / 2}px`
|
378
|
+
};
|
379
|
+
|
380
|
+
return (
|
381
|
+
<div
|
382
|
+
className={cx(mobileClassName, 'PickerColumns', 'PickerColumns-popOver')}
|
383
|
+
>
|
384
|
+
<div className={cx('PickerColumns-toolbar')}>
|
385
|
+
<Button level="default" onClick={onClose}>
|
386
|
+
{__('cancel')}
|
387
|
+
</Button>
|
388
|
+
<Button level="primary" onClick={onConfirm}>
|
389
|
+
{__('confirm')}
|
390
|
+
</Button>
|
391
|
+
</div>
|
392
|
+
<div className={cx('PickerColumns-columns')} style={columnsStyle}>
|
393
|
+
<div
|
394
|
+
ref={root}
|
395
|
+
className={props.classnames(props.className)}
|
396
|
+
onTouchStart={onTouchStart}
|
397
|
+
onTouchMove={onTouchMove}
|
398
|
+
onTouchEnd={onTouchEnd}
|
399
|
+
onTouchCancel={onTouchEnd}
|
400
|
+
>
|
401
|
+
<ul
|
402
|
+
ref={wrapper}
|
403
|
+
style={wrapperStyle}
|
404
|
+
className={props.classnames('PickerColumns-columnWrapper')}
|
405
|
+
onTransitionEnd={stopMomentum}
|
406
|
+
>
|
407
|
+
{renderOptions()}
|
408
|
+
</ul>
|
409
|
+
</div>
|
410
|
+
<div className={cx('PickerColumns-mask')} style={maskStyle}></div>
|
411
|
+
<div className={cx('PickerColumns-frame')} style={frameStyle}></div>
|
412
|
+
</div>
|
413
|
+
</div>
|
414
|
+
);
|
415
|
+
});
|
416
|
+
|
417
|
+
PickerColumn.defaultProps = {
|
418
|
+
options: [],
|
419
|
+
visibleItemCount: 5,
|
420
|
+
swipeDuration: 1000
|
421
|
+
};
|
422
|
+
|
423
|
+
export default themeable(
|
424
|
+
localeable(
|
425
|
+
uncontrollable(PickerColumn, {
|
426
|
+
value: 'onChange'
|
427
|
+
})
|
428
|
+
)
|
429
|
+
);
|
@@ -0,0 +1,128 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import {autobind} from '../utils/helper';
|
3
|
+
import Overlay from './Overlay';
|
4
|
+
import PopOver from './PopOver';
|
5
|
+
import {findDOMNode} from 'react-dom';
|
6
|
+
import Modal from './Modal';
|
7
|
+
import {themeable, ThemeProps} from '../theme';
|
8
|
+
import {localeable, LocaleProps} from '../locale';
|
9
|
+
import Button from './Button';
|
10
|
+
|
11
|
+
export interface PickerContainerProps extends ThemeProps, LocaleProps {
|
12
|
+
title?: string;
|
13
|
+
children: (props: {
|
14
|
+
onClick: (e: React.MouseEvent) => void;
|
15
|
+
isOpened: boolean;
|
16
|
+
}) => JSX.Element;
|
17
|
+
popOverRender: (props: {
|
18
|
+
onClose: () => void;
|
19
|
+
value: any;
|
20
|
+
onChange: (value: any) => void;
|
21
|
+
}) => JSX.Element;
|
22
|
+
value?: any;
|
23
|
+
onConfirm?: (value?: any) => void;
|
24
|
+
onCancel?: () => void;
|
25
|
+
popOverContainer?: any;
|
26
|
+
popOverClassName?: string;
|
27
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
28
|
+
}
|
29
|
+
|
30
|
+
export interface PickerContainerState {
|
31
|
+
isOpened: boolean;
|
32
|
+
value?: any;
|
33
|
+
}
|
34
|
+
|
35
|
+
export class PickerContainer extends React.Component<
|
36
|
+
PickerContainerProps,
|
37
|
+
PickerContainerState
|
38
|
+
> {
|
39
|
+
state: PickerContainerState = {
|
40
|
+
isOpened: false,
|
41
|
+
value: this.props.value
|
42
|
+
};
|
43
|
+
|
44
|
+
componentDidUpdate(prevProps: PickerContainerProps) {
|
45
|
+
const props = this.props;
|
46
|
+
|
47
|
+
if (props.value !== prevProps.value) {
|
48
|
+
this.setState({
|
49
|
+
value: props.value
|
50
|
+
});
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
@autobind
|
55
|
+
handleClick() {
|
56
|
+
this.setState({
|
57
|
+
isOpened: true
|
58
|
+
});
|
59
|
+
}
|
60
|
+
|
61
|
+
@autobind
|
62
|
+
close(e?: any, callback?: () => void) {
|
63
|
+
this.setState(
|
64
|
+
{
|
65
|
+
isOpened: false
|
66
|
+
},
|
67
|
+
callback || (() => this.props.onCancel?.())
|
68
|
+
);
|
69
|
+
}
|
70
|
+
|
71
|
+
@autobind
|
72
|
+
handleChange(value: any) {
|
73
|
+
this.setState({
|
74
|
+
value
|
75
|
+
});
|
76
|
+
}
|
77
|
+
|
78
|
+
@autobind
|
79
|
+
confirm() {
|
80
|
+
const {onConfirm} = this.props;
|
81
|
+
|
82
|
+
this.close(undefined, () => onConfirm?.(this.state.value));
|
83
|
+
}
|
84
|
+
|
85
|
+
render() {
|
86
|
+
const {
|
87
|
+
children,
|
88
|
+
popOverRender: dropdownRender,
|
89
|
+
title,
|
90
|
+
translate: __,
|
91
|
+
size
|
92
|
+
} = this.props;
|
93
|
+
return (
|
94
|
+
<>
|
95
|
+
{children({
|
96
|
+
isOpened: this.state.isOpened,
|
97
|
+
onClick: this.handleClick
|
98
|
+
})}
|
99
|
+
|
100
|
+
<Modal
|
101
|
+
size={size}
|
102
|
+
closeOnEsc
|
103
|
+
show={this.state.isOpened}
|
104
|
+
onHide={this.close}
|
105
|
+
>
|
106
|
+
<Modal.Header onClose={this.close}>
|
107
|
+
{__(title || 'Select.placeholder')}
|
108
|
+
</Modal.Header>
|
109
|
+
<Modal.Body>
|
110
|
+
{dropdownRender({
|
111
|
+
onClose: this.close,
|
112
|
+
value: this.state.value,
|
113
|
+
onChange: this.handleChange
|
114
|
+
})}
|
115
|
+
</Modal.Body>
|
116
|
+
<Modal.Footer>
|
117
|
+
<Button onClick={this.close}>{__('cancel')}</Button>
|
118
|
+
<Button onClick={this.confirm} level="primary">
|
119
|
+
{__('confirm')}
|
120
|
+
</Button>
|
121
|
+
</Modal.Footer>
|
122
|
+
</Modal>
|
123
|
+
</>
|
124
|
+
);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
export default themeable(localeable(PickerContainer));
|
@@ -11,6 +11,7 @@
|
|
11
11
|
* disabled: false
|
12
12
|
* }
|
13
13
|
* ]
|
14
|
+
*
|
14
15
|
*/
|
15
16
|
|
16
17
|
import React from 'react';
|
@@ -48,14 +49,8 @@ export class Radios extends React.Component<RadioProps, any> {
|
|
48
49
|
};
|
49
50
|
|
50
51
|
toggleOption(option: Option) {
|
51
|
-
const {
|
52
|
-
|
53
|
-
onChange,
|
54
|
-
valueField,
|
55
|
-
clearable,
|
56
|
-
delimiter,
|
57
|
-
options
|
58
|
-
} = this.props;
|
52
|
+
const {value, onChange, valueField, clearable, delimiter, options} =
|
53
|
+
this.props;
|
59
54
|
|
60
55
|
let valueArray = value2array(value, {
|
61
56
|
multiple: false,
|