@zgfe/business-lib 1.0.0-beta.6 → 1.0.3
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/es/analysisLayout/demo/index.js +4 -1
- package/es/analysisLayout/index.d.ts +1 -28
- package/es/analysisLayout/index.js +38 -48
- package/es/analysisLayout/index.less +1 -1
- package/es/assets/styles/chunks.less +143 -0
- package/es/assets/styles/inner.less +3 -0
- package/es/assets/styles/resetAntd.less +398 -0
- package/es/assets/styles/variable.less +21 -0
- package/es/assets/theme.d.ts +5 -0
- package/es/assets/theme.js +4 -0
- package/es/attrConditions/components/operateList.d.ts +8 -0
- package/es/attrConditions/components/operateList.js +83 -0
- package/es/attrConditions/components/stringList.d.ts +9 -0
- package/es/attrConditions/components/stringList.js +168 -0
- package/es/attrConditions/components/valuesList.d.ts +10 -0
- package/es/attrConditions/components/valuesList.js +188 -0
- package/es/{attributeSelector/demo/multi.d.ts → attrConditions/demo/group.d.ts} +0 -0
- package/es/attrConditions/demo/group.js +82 -0
- package/es/{globalAttributes → attrConditions}/demo/index.d.ts +0 -0
- package/es/{datePicker/demo/form.js → attrConditions/demo/index.js} +43 -23
- package/es/attrConditions/group.d.ts +5 -0
- package/es/attrConditions/group.js +183 -0
- package/es/attrConditions/index.d.ts +6 -0
- package/es/attrConditions/index.js +160 -0
- package/es/attrConditions/styles/group.less +49 -0
- package/es/attrConditions/styles/index.less +94 -0
- package/es/attrConditions/types.d.ts +63 -0
- package/es/attrConditions/types.js +19 -0
- package/es/attrConditions/utils/operates.d.ts +16 -0
- package/es/attrConditions/utils/operates.js +67 -0
- package/es/attributeSelector/demo/index.d.ts +3 -0
- package/es/attributeSelector/demo/{singleForm.js → index.js} +42 -44
- package/es/attributeSelector/index.d.ts +4 -111
- package/es/attributeSelector/index.js +88 -543
- package/es/attributeSelector/listPanel.d.ts +4 -0
- package/es/attributeSelector/listPanel.js +208 -0
- package/es/attributeSelector/option.d.ts +15 -0
- package/es/attributeSelector/option.js +53 -0
- package/es/attributeSelector/styles/index.less +100 -0
- package/es/attributeSelector/types.d.ts +79 -0
- package/es/attributeSelector/types.js +15 -0
- package/es/attributeSelector/util.d.ts +7 -0
- package/es/attributeSelector/util.js +69 -0
- package/es/chart/demo/pie.js +1 -0
- package/es/chart/index.d.ts +2 -96
- package/es/chart/index.js +28 -35
- package/es/chart/styles/index.less +50 -0
- package/es/chart/types.d.ts +46 -0
- package/es/chart/{type.js → types.js} +0 -0
- package/es/chart/util/{chartConfig.d.ts → chartOptionConfig.d.ts} +4 -35
- package/es/chart/util/{chartConfig.js → chartOptionConfig.js} +45 -111
- package/es/chart/util/formatData.d.ts +3 -7
- package/es/chart/util/formatData.js +47 -26
- package/es/chart/util/formatOption.d.ts +2 -1
- package/es/chart/util/formatOption.js +22 -9
- package/es/chart/util/mapUtil.d.ts +3 -3
- package/es/chart/util/mapUtil.js +9 -19
- package/es/commonStyle/icon.less +116 -112
- package/es/commonStyle/select.less +1 -1
- package/es/commonStyle/theme.less +520 -473
- package/es/components/iconFont.js +4 -2
- package/es/context/index.d.ts +16 -0
- package/es/context/index.js +3 -0
- package/es/datePicker/datePicker.d.ts +10 -0
- package/es/datePicker/datePicker.js +115 -0
- package/es/datePicker/demo/index.d.ts +1 -0
- package/es/datePicker/demo/index.js +9 -2
- package/es/datePicker/index.d.ts +4 -27
- package/es/datePicker/index.js +72 -148
- package/es/datePicker/styles/index.less +48 -0
- package/es/datePicker/types.d.ts +24 -0
- package/es/{eventSelector/type.js → datePicker/types.js} +0 -0
- package/es/datePicker/utils.d.ts +6 -0
- package/es/datePicker/utils.js +70 -0
- package/es/dialog/components/itemNode.d.ts +10 -0
- package/es/dialog/components/itemNode.js +109 -0
- package/es/dialog/components/list.d.ts +3 -13
- package/es/dialog/components/list.js +15 -12
- package/es/dialog/components/selectToInput.d.ts +4 -48
- package/es/dialog/components/selectToInput.js +74 -80
- package/es/dialog/components/styles/handle.less +39 -0
- package/es/dialog/components/styles/list.less +60 -0
- package/es/dialog/components/styles/tab.less +55 -0
- package/es/dialog/components/tab.d.ts +3 -7
- package/es/dialog/components/tab.js +57 -19
- package/es/dialog/data/{chart.d.ts → data.d.ts} +9 -0
- package/es/dialog/data/{chart.js → data.js} +11 -0
- package/es/dialog/demo/index.d.ts +23 -0
- package/es/dialog/demo/index.js +34 -3
- package/es/dialog/demo/index2.js +14 -2
- package/es/dialog/index.d.ts +4 -97
- package/es/dialog/index.js +54 -109
- package/es/dialog/styles/index.less +11 -0
- package/es/dialog/types.d.ts +77 -0
- package/es/{targetConditionGroup/type.js → dialog/types.js} +0 -0
- package/es/eventSelector/demo/index.js +26 -44
- package/es/eventSelector/index.d.ts +4 -30
- package/es/eventSelector/index.js +90 -416
- package/es/eventSelector/listPanel.d.ts +4 -0
- package/es/eventSelector/listPanel.js +197 -0
- package/es/eventSelector/option.d.ts +17 -0
- package/es/eventSelector/option.js +54 -0
- package/es/eventSelector/styles/index.less +77 -0
- package/es/eventSelector/types.d.ts +31 -0
- package/es/eventSelector/types.js +1 -0
- package/es/index.d.ts +14 -11
- package/es/index.js +9 -11
- package/es/{attributeSelector/data → mock}/env.d.ts +0 -0
- package/es/{attributeSelector/data → mock}/env.js +0 -0
- package/es/{attributeSelector/data → mock}/event.d.ts +0 -0
- package/es/{attributeSelector/data → mock}/event.js +0 -0
- package/es/{attributeSelector/data → mock}/user.d.ts +0 -0
- package/es/{attributeSelector/data → mock}/user.js +0 -0
- package/es/{multipleSelector → searchInput}/demo/index.d.ts +0 -0
- package/es/searchInput/demo/index.js +5 -0
- package/es/searchInput/index.d.ts +8 -0
- package/es/searchInput/index.js +31 -0
- package/es/{attributeSelector/demo/multiForm.d.ts → select/demo/group.d.ts} +0 -0
- package/es/{globalAttributes/demo/index.js → select/demo/group.js} +49 -31
- package/es/select/demo/index.js +49 -21
- package/es/{attributeSelector/demo/single.d.ts → select/demo/multiple.d.ts} +0 -0
- package/es/{multipleSelector/demo/index.js → select/demo/multiple.js} +55 -12
- package/es/select/handle.d.ts +5 -0
- package/es/select/handle.js +119 -0
- package/es/select/index.d.ts +4 -49
- package/es/select/index.js +168 -122
- package/es/select/option.d.ts +4 -0
- package/es/select/option.js +59 -0
- package/es/select/overlay.d.ts +4 -0
- package/es/select/overlay.js +154 -0
- package/es/select/styles/handle.less +111 -0
- package/es/select/styles/index.less +99 -0
- package/es/select/types.d.ts +65 -0
- package/es/select/types.js +1 -0
- package/es/table/demo/data/table.js +1 -1
- package/es/table/demo/index.d.ts +1 -1
- package/es/table/demo/index.js +9 -8
- package/es/table/demo/index3.js +9 -18
- package/es/table/index.d.ts +4 -30
- package/es/table/index.js +30 -26
- package/es/table/styles/index.less +5 -0
- package/es/table/type.d.ts +10 -0
- package/es/table/type.js +1 -0
- package/es/targetConditionGroup/components/targetDimension.d.ts +8 -0
- package/es/targetConditionGroup/components/targetDimension.js +153 -0
- package/es/targetConditionGroup/data/operates.d.ts +8 -24
- package/es/targetConditionGroup/data/operates.js +26 -69
- package/es/targetConditionGroup/demo/group.d.ts +1 -0
- package/es/targetConditionGroup/demo/group.js +108 -23
- package/es/targetConditionGroup/demo/index.js +34 -34
- package/es/targetConditionGroup/demo/styles/index.less +29 -0
- package/es/targetConditionGroup/index.d.ts +4 -57
- package/es/targetConditionGroup/index.js +177 -274
- package/es/targetConditionGroup/styles/index.less +25 -0
- package/es/targetConditionGroup/types.d.ts +32 -0
- package/es/targetConditionGroup/types.js +1 -0
- package/es/targetSelector/demo/index.d.ts +1 -0
- package/es/targetSelector/demo/index.js +29 -71
- package/es/targetSelector/editBox.d.ts +8 -0
- package/es/targetSelector/{components/BizEventNameEditBox.js → editBox.js} +49 -24
- package/es/targetSelector/index.d.ts +5 -55
- package/es/targetSelector/index.js +103 -214
- package/es/targetSelector/optionIcon.d.ts +9 -0
- package/es/targetSelector/optionIcon.js +24 -0
- package/es/targetSelector/optionMenu.d.ts +7 -0
- package/es/targetSelector/optionMenu.js +38 -0
- package/es/targetSelector/styles/index.less +88 -0
- package/es/targetSelector/types.d.ts +18 -0
- package/es/targetSelector/types.js +1 -0
- package/es/userCondition/conditionTypeList.d.ts +10 -0
- package/es/userCondition/conditionTypeList.js +43 -0
- package/es/userCondition/conditionWrap.d.ts +7 -0
- package/es/userCondition/conditionWrap.js +18 -0
- package/es/userCondition/conditions/eventCondition.d.ts +8 -0
- package/es/userCondition/conditions/eventCondition.js +104 -0
- package/es/userCondition/conditions/periodCondition.d.ts +11 -0
- package/es/userCondition/conditions/periodCondition.js +156 -0
- package/es/userCondition/conditions/propCondition.d.ts +11 -0
- package/es/userCondition/conditions/propCondition.js +147 -0
- package/es/userCondition/conditions/runTimesCondition.d.ts +9 -0
- package/es/userCondition/conditions/runTimesCondition.js +78 -0
- package/es/userCondition/conditions/styles/eventCondition.less +49 -0
- package/es/userCondition/conditions/styles/periodCondition.less +14 -0
- package/es/userCondition/conditions/styles/propCondition.less +36 -0
- package/es/userCondition/conditions/styles/runTimesCondition.less +16 -0
- package/es/{attributeSelector/demo/singleForm.d.ts → userCondition/demo/index.d.ts} +0 -0
- package/es/userCondition/demo/index.js +97 -0
- package/es/userCondition/index.d.ts +7 -0
- package/es/userCondition/index.js +146 -0
- package/es/userCondition/orConditions.d.ts +5 -0
- package/es/userCondition/orConditions.js +202 -0
- package/es/userCondition/relationLabel.d.ts +6 -0
- package/es/userCondition/relationLabel.js +12 -0
- package/es/userCondition/styles/conditionTypeList.less +31 -0
- package/es/userCondition/styles/conditionWrap.less +14 -0
- package/es/userCondition/styles/index.less +13 -0
- package/es/userCondition/styles/orConditions.less +16 -0
- package/es/userCondition/styles/relationLabel.less +18 -0
- package/es/userCondition/types.d.ts +79 -0
- package/es/userCondition/types.js +1 -0
- package/es/userCondition/util.d.ts +2 -0
- package/es/userCondition/util.js +54 -0
- package/es/{datePicker/demo/form.d.ts → userGroup/demo/group.d.ts} +0 -0
- package/es/{targetConditionGroup/demo/form.js → userGroup/demo/group.js} +68 -72
- package/es/userGroup/demo/index.d.ts +0 -1
- package/es/userGroup/demo/index.js +5 -62
- package/es/userGroup/index.d.ts +3 -77
- package/es/userGroup/index.js +60 -108
- package/es/userGroup/styles/index.less +20 -0
- package/es/userGroup/types.d.ts +15 -0
- package/es/userGroup/types.js +1 -0
- package/es/utils/ajax.js +5 -20
- package/es/utils/type.d.ts +42 -44
- package/es/utils/util.d.ts +1 -35
- package/es/utils/util.js +27 -57
- package/package.json +11 -4
- package/es/attributeSelector/demo/multi.js +0 -39
- package/es/attributeSelector/demo/multiForm.js +0 -64
- package/es/attributeSelector/demo/single.js +0 -43
- package/es/attributeSelector/group.d.ts +0 -31
- package/es/attributeSelector/group.js +0 -225
- package/es/attributeSelector/index.less +0 -172
- package/es/chart/index.less +0 -38
- package/es/chart/style/circle.svg +0 -4
- package/es/chart/type.d.ts +0 -22
- package/es/datePicker/data.d.ts +0 -9
- package/es/datePicker/data.js +0 -65
- package/es/datePicker/index.less +0 -364
- package/es/dialog/components/style/list.less +0 -59
- package/es/dialog/components/style/tab.less +0 -61
- package/es/dialog/style/index.less +0 -86
- package/es/eventSelector/demo/form.d.ts +0 -2
- package/es/eventSelector/demo/form.js +0 -89
- package/es/eventSelector/demo/nodata.d.ts +0 -2
- package/es/eventSelector/demo/nodata.js +0 -13
- package/es/eventSelector/index.less +0 -121
- package/es/eventSelector/type.d.ts +0 -41
- package/es/globalAttributes/demo/data/env.d.ts +0 -11
- package/es/globalAttributes/demo/data/env.js +0 -181
- package/es/globalAttributes/demo/data/event.d.ts +0 -237
- package/es/globalAttributes/demo/data/event.js +0 -3483
- package/es/globalAttributes/demo/data/user.d.ts +0 -22
- package/es/globalAttributes/demo/data/user.js +0 -218
- package/es/globalAttributes/index.d.ts +0 -47
- package/es/globalAttributes/index.js +0 -112
- package/es/multipleSelector/index.d.ts +0 -36
- package/es/multipleSelector/index.js +0 -131
- package/es/multipleSelector/index.less +0 -136
- package/es/table/demo/index.less +0 -8
- package/es/table/index.less +0 -139
- package/es/targetConditionGroup/components/conditionGroup.d.ts +0 -30
- package/es/targetConditionGroup/components/conditionGroup.js +0 -112
- package/es/targetConditionGroup/components/conditionItem.d.ts +0 -47
- package/es/targetConditionGroup/components/conditionItem.js +0 -232
- package/es/targetConditionGroup/components/style/group.less +0 -47
- package/es/targetConditionGroup/components/style/index.less +0 -16
- package/es/targetConditionGroup/demo/data/env.d.ts +0 -11
- package/es/targetConditionGroup/demo/data/env.js +0 -181
- package/es/targetConditionGroup/demo/data/event.d.ts +0 -237
- package/es/targetConditionGroup/demo/data/event.js +0 -3483
- package/es/targetConditionGroup/demo/data/user.d.ts +0 -22
- package/es/targetConditionGroup/demo/data/user.js +0 -218
- package/es/targetConditionGroup/demo/form.d.ts +0 -2
- package/es/targetConditionGroup/demo/item.d.ts +0 -2
- package/es/targetConditionGroup/demo/item.js +0 -5
- package/es/targetConditionGroup/group.d.ts +0 -56
- package/es/targetConditionGroup/group.js +0 -204
- package/es/targetConditionGroup/index.less +0 -76
- package/es/targetConditionGroup/type.d.ts +0 -95
- package/es/targetSelector/components/BizCascadeBox.d.ts +0 -34
- package/es/targetSelector/components/BizCascadeBox.js +0 -213
- package/es/targetSelector/components/BizEventNameEditBox.d.ts +0 -20
- package/es/targetSelector/demo/form.d.ts +0 -2
- package/es/targetSelector/demo/form.js +0 -133
- package/es/targetSelector/demo/nodata.d.ts +0 -2
- package/es/targetSelector/demo/nodata.js +0 -13
- package/es/targetSelector/index.less +0 -28
- package/es/userGroup/demo/cluster.d.ts +0 -3
- package/es/userGroup/demo/cluster.js +0 -102
- package/es/userGroup/demo/index.less +0 -3
- package/es/userGroup/index.less +0 -2
- package/es/userGroup/userCluster.d.ts +0 -63
- package/es/userGroup/userCluster.js +0 -255
package/es/select/demo/index.js
CHANGED
|
@@ -13,39 +13,67 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import React, { useState } from 'react';
|
|
14
14
|
import { BizSelect } from '@zgfe/business-lib';
|
|
15
15
|
import { Button } from 'antd';
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
value: '
|
|
16
|
+
var stringOperate = [{
|
|
17
|
+
name: '是',
|
|
18
|
+
value: 'equal'
|
|
19
19
|
}, {
|
|
20
|
-
|
|
21
|
-
value: '
|
|
20
|
+
name: '包含',
|
|
21
|
+
value: 'contains'
|
|
22
22
|
}, {
|
|
23
|
-
|
|
24
|
-
value: '
|
|
25
|
-
|
|
23
|
+
name: '不是',
|
|
24
|
+
value: 'not equal'
|
|
25
|
+
}, {
|
|
26
|
+
name: '不包含',
|
|
27
|
+
value: 'not contains'
|
|
28
|
+
}, {
|
|
29
|
+
name: '开头是',
|
|
30
|
+
value: 'begin with'
|
|
31
|
+
}, {
|
|
32
|
+
name: '结尾是',
|
|
33
|
+
value: 'end with'
|
|
34
|
+
}, {
|
|
35
|
+
name: '开头不是',
|
|
36
|
+
value: 'not begin with'
|
|
37
|
+
}, {
|
|
38
|
+
name: '结尾不是',
|
|
39
|
+
value: 'not end with'
|
|
40
|
+
}, {
|
|
41
|
+
name: '是空值',
|
|
42
|
+
value: 'is null'
|
|
43
|
+
}, {
|
|
44
|
+
name: '不是空值',
|
|
45
|
+
value: 'is not null'
|
|
46
|
+
}];
|
|
47
|
+
var disabledList = [{
|
|
48
|
+
value: 'not equal'
|
|
49
|
+
}, {
|
|
50
|
+
value: 'not begin with'
|
|
26
51
|
}];
|
|
27
52
|
export default (function () {
|
|
28
|
-
var _useState = useState(
|
|
53
|
+
var _useState = useState({
|
|
54
|
+
name: '不是',
|
|
55
|
+
value: 'not equal'
|
|
56
|
+
}),
|
|
29
57
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
58
|
data = _useState2[0],
|
|
31
59
|
setData = _useState2[1];
|
|
32
60
|
|
|
33
|
-
var
|
|
34
|
-
console.log('select >>', value);
|
|
61
|
+
var onChange = function onChange(value) {
|
|
35
62
|
setData(function () {
|
|
36
63
|
return value;
|
|
37
64
|
});
|
|
38
65
|
};
|
|
39
66
|
|
|
40
67
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizSelect, {
|
|
41
|
-
options:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
68
|
+
options: stringOperate,
|
|
69
|
+
defaultValue: data,
|
|
70
|
+
labelField: "name",
|
|
71
|
+
keyField: "value",
|
|
72
|
+
enableSearch: true,
|
|
73
|
+
theme: "secondary",
|
|
74
|
+
popupContainer: true,
|
|
75
|
+
onChange: onChange,
|
|
76
|
+
disableItemList: disabledList,
|
|
77
|
+
dropdownExtra: /*#__PURE__*/React.createElement(Button, null, "+ \u6DFB\u52A0")
|
|
78
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u9009\u62E9\u7684\u503C\u662F\uFF1A", JSON.stringify(data)));
|
|
51
79
|
});
|
|
File without changes
|
|
@@ -11,25 +11,68 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
12
|
|
|
13
13
|
import React, { useState } from 'react';
|
|
14
|
-
import {
|
|
15
|
-
var
|
|
14
|
+
import { BizSelect } from '@zgfe/business-lib';
|
|
15
|
+
var stringOperate = [{
|
|
16
|
+
name: '是',
|
|
17
|
+
value: 'equal'
|
|
18
|
+
}, {
|
|
19
|
+
name: '包含',
|
|
20
|
+
value: 'contains'
|
|
21
|
+
}, {
|
|
22
|
+
name: '不是',
|
|
23
|
+
value: 'not equal'
|
|
24
|
+
}, {
|
|
25
|
+
name: '不包含',
|
|
26
|
+
value: 'not contains'
|
|
27
|
+
}, {
|
|
28
|
+
name: '开头是',
|
|
29
|
+
value: 'begin with'
|
|
30
|
+
}, {
|
|
31
|
+
name: '结尾是',
|
|
32
|
+
value: 'end with'
|
|
33
|
+
}, {
|
|
34
|
+
name: '开头不是',
|
|
35
|
+
value: 'not begin with'
|
|
36
|
+
}, {
|
|
37
|
+
name: '结尾不是',
|
|
38
|
+
value: 'not end with'
|
|
39
|
+
}, {
|
|
40
|
+
name: '是空值',
|
|
41
|
+
value: 'is null'
|
|
42
|
+
}, {
|
|
43
|
+
name: '不是空值',
|
|
44
|
+
value: 'is not null'
|
|
45
|
+
}];
|
|
46
|
+
var disabledList = [{
|
|
47
|
+
name: '不包含',
|
|
48
|
+
value: 'not contains'
|
|
49
|
+
}, {
|
|
50
|
+
name: '开头不是',
|
|
51
|
+
value: 'not begin with'
|
|
52
|
+
}];
|
|
16
53
|
export default (function () {
|
|
17
|
-
var _useState = useState(
|
|
54
|
+
var _useState = useState(),
|
|
18
55
|
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
-
|
|
20
|
-
|
|
56
|
+
data = _useState2[0],
|
|
57
|
+
setData = _useState2[1];
|
|
21
58
|
|
|
22
|
-
var
|
|
23
|
-
|
|
59
|
+
var onChange = function onChange(value) {
|
|
60
|
+
setData(function () {
|
|
61
|
+
return value;
|
|
62
|
+
});
|
|
24
63
|
};
|
|
25
64
|
|
|
26
65
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
66
|
style: {
|
|
28
67
|
width: '400px'
|
|
29
68
|
}
|
|
30
|
-
}, /*#__PURE__*/React.createElement(
|
|
31
|
-
options:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
69
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
70
|
+
options: stringOperate,
|
|
71
|
+
labelField: "name",
|
|
72
|
+
keyField: "value",
|
|
73
|
+
onChange: onChange,
|
|
74
|
+
disableItemList: disabledList,
|
|
75
|
+
multiple: true,
|
|
76
|
+
enableCreate: true
|
|
77
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u9009\u62E9\u7684\u503C\u662F\uFF1A", JSON.stringify(data)));
|
|
35
78
|
});
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
import { Input, Tag, Tooltip } from 'antd';
|
|
14
|
+
import React, { useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
15
|
+
import IconFont from '../components/iconFont';
|
|
16
|
+
import './styles/handle.less';
|
|
17
|
+
var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
18
|
+
var placeholder = props.placeholder,
|
|
19
|
+
labelField = props.labelField,
|
|
20
|
+
keyField = props.keyField,
|
|
21
|
+
_props$border = props.border,
|
|
22
|
+
border = _props$border === void 0 ? true : _props$border;
|
|
23
|
+
var classPrefix = 'biz-select-handle';
|
|
24
|
+
|
|
25
|
+
var _useState = useState(false),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
focus = _useState2[0],
|
|
28
|
+
setFocus = _useState2[1];
|
|
29
|
+
|
|
30
|
+
var handleRef = useRef(null);
|
|
31
|
+
var inputRef = useRef(null);
|
|
32
|
+
|
|
33
|
+
var _useState3 = useState(''),
|
|
34
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
35
|
+
searchValue = _useState4[0],
|
|
36
|
+
setSearchValue = _useState4[1];
|
|
37
|
+
|
|
38
|
+
useImperativeHandle(ref, function () {
|
|
39
|
+
return {
|
|
40
|
+
create: function create(flag) {
|
|
41
|
+
if (props.disable) return;
|
|
42
|
+
setFocus(flag);
|
|
43
|
+
if (!props.multiple) return;
|
|
44
|
+
|
|
45
|
+
if (flag) {
|
|
46
|
+
inputRef.current.focus();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
setSearchValue('');
|
|
50
|
+
|
|
51
|
+
if (props.enableCreate && searchValue && !flag) {
|
|
52
|
+
if (props.onCreate) props.onCreate(searchValue);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
width: handleRef.current.clientWidth
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
var searchInputWidth = useMemo(function () {
|
|
59
|
+
return searchValue.length * 14 || 3;
|
|
60
|
+
}, [searchValue]);
|
|
61
|
+
|
|
62
|
+
var onDelete = function onDelete(data) {
|
|
63
|
+
if (props.onDelete) props.onDelete(data);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var onSearch = function onSearch(e) {
|
|
67
|
+
var value = e.target.value;
|
|
68
|
+
setSearchValue(value);
|
|
69
|
+
if (props.onSearch) props.onSearch(value);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
if (props.multiple) {
|
|
73
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
ref: handleRef,
|
|
75
|
+
className: "".concat(classPrefix, "-input ").concat(classPrefix, "-input-multiple\n ").concat(props.theme ? props.theme : '', " ").concat(props.disable ? 'disable' : '', " \n ").concat(focus ? 'active' : '', " ").concat(border ? '' : 'borderless', " ").concat(props.size ? props.size : '')
|
|
76
|
+
}, props.value && props.value.length > 0 ? props.value.map(function (item, index) {
|
|
77
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
78
|
+
title: item[labelField],
|
|
79
|
+
key: item[keyField] || index,
|
|
80
|
+
overlayClassName: "".concat(classPrefix, "-tooltip"),
|
|
81
|
+
color: "#fff"
|
|
82
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
83
|
+
closable: true,
|
|
84
|
+
className: "".concat(classPrefix, "-tag"),
|
|
85
|
+
onClose: function onClose() {
|
|
86
|
+
onDelete(item);
|
|
87
|
+
}
|
|
88
|
+
}, item[labelField]));
|
|
89
|
+
}) : !focus ? /*#__PURE__*/React.createElement("span", {
|
|
90
|
+
className: "".concat(classPrefix, "-holder")
|
|
91
|
+
}, placeholder || '请选择') : '', /*#__PURE__*/React.createElement(Input, {
|
|
92
|
+
ref: inputRef,
|
|
93
|
+
autoFocus: focus,
|
|
94
|
+
disabled: props.disable,
|
|
95
|
+
className: "".concat(classPrefix, "-search"),
|
|
96
|
+
style: {
|
|
97
|
+
width: "".concat(searchInputWidth, "px")
|
|
98
|
+
},
|
|
99
|
+
value: searchValue,
|
|
100
|
+
onChange: onSearch
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
ref: handleRef,
|
|
106
|
+
className: "".concat(classPrefix, "-input ").concat(classPrefix, "-single-input ").concat(props.theme ? props.theme : '', "\n ").concat(props.disable ? 'disable' : '', " ").concat(focus ? 'active' : '', " \n ").concat(border ? '' : 'borderless', " ").concat(props.size ? props.size : ''),
|
|
107
|
+
title: props.label || props.value && props.value[labelField]
|
|
108
|
+
}, props.label || props.value && props.value[labelField] || /*#__PURE__*/React.createElement("span", {
|
|
109
|
+
className: "".concat(classPrefix, "-holder")
|
|
110
|
+
}, placeholder || '请选择'), /*#__PURE__*/React.createElement(IconFont, {
|
|
111
|
+
className: "".concat(classPrefix, "-expand-icon"),
|
|
112
|
+
type: 'icon-xiangxia'
|
|
113
|
+
}));
|
|
114
|
+
});
|
|
115
|
+
SelectHandle.defaultProps = {
|
|
116
|
+
labelField: 'label',
|
|
117
|
+
keyField: 'id'
|
|
118
|
+
};
|
|
119
|
+
export default SelectHandle;
|
package/es/select/index.d.ts
CHANGED
|
@@ -1,51 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import './
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: string;
|
|
7
|
-
}
|
|
8
|
-
interface BizSelectProps {
|
|
9
|
-
/**
|
|
10
|
-
* @description 自定义节点
|
|
11
|
-
* @default { label: 'label', value: 'value' }
|
|
12
|
-
*/
|
|
13
|
-
fieldNames?: fieldNamesProps;
|
|
14
|
-
/**
|
|
15
|
-
* @description 默认值
|
|
16
|
-
* @default -
|
|
17
|
-
*/
|
|
18
|
-
defaultValue?: string | number;
|
|
19
|
-
/**
|
|
20
|
-
* @description 下拉名称
|
|
21
|
-
* @default '''
|
|
22
|
-
*/
|
|
23
|
-
name?: string;
|
|
24
|
-
/**
|
|
25
|
-
* @description 创建option回调
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
|
-
createOption?: () => void;
|
|
29
|
-
/**
|
|
30
|
-
* @description 是否搜索option
|
|
31
|
-
* @default false
|
|
32
|
-
*/
|
|
33
|
-
search?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* @description 是否有创建option
|
|
36
|
-
* @default false
|
|
37
|
-
*/
|
|
38
|
-
create?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* @description 文本框类
|
|
41
|
-
* @default small
|
|
42
|
-
*/
|
|
43
|
-
dropdownSize?: string;
|
|
44
|
-
/**
|
|
45
|
-
* @description 弹窗样式
|
|
46
|
-
* @default false
|
|
47
|
-
*/
|
|
48
|
-
isDialog?: boolean;
|
|
49
|
-
}
|
|
50
|
-
declare const BizSelect: React.FC<BizSelectProps & SelectProps>;
|
|
2
|
+
import './styles/index.less';
|
|
3
|
+
import { BizSelectTypes } from './types';
|
|
4
|
+
export declare const classPrefix = "biz-select";
|
|
5
|
+
declare const BizSelect: React.FC<BizSelectTypes.Props>;
|
|
51
6
|
export default BizSelect;
|
package/es/select/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["
|
|
1
|
+
var _excluded = ["overlayWidth", "labelField", "keyField"];
|
|
2
2
|
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
@@ -22,145 +22,191 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
22
22
|
|
|
23
23
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
24
24
|
|
|
25
|
-
import {
|
|
26
|
-
import React, { useEffect, useState } from 'react';
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import './index.less';
|
|
30
|
-
|
|
25
|
+
import { Dropdown } from 'antd';
|
|
26
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
27
|
+
import SelectHandle from './handle';
|
|
28
|
+
import SelectOverlay from './overlay';
|
|
29
|
+
import './styles/index.less';
|
|
30
|
+
import _ from 'lodash';
|
|
31
|
+
export var classPrefix = 'biz-select';
|
|
31
32
|
|
|
32
33
|
var BizSelect = function BizSelect(props) {
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
isDialog = _props$isDialog === void 0 ? false : _props$isDialog,
|
|
37
|
-
_props$placeholder = props.placeholder,
|
|
38
|
-
placeholder = _props$placeholder === void 0 ? '请选择' : _props$placeholder,
|
|
39
|
-
_props$fieldNames = props.fieldNames,
|
|
40
|
-
fieldNames = _props$fieldNames === void 0 ? {
|
|
41
|
-
label: 'label',
|
|
42
|
-
value: 'value'
|
|
43
|
-
} : _props$fieldNames,
|
|
44
|
-
dropdownSize = props.dropdownSize,
|
|
45
|
-
_props$size = props.size,
|
|
46
|
-
size = _props$size === void 0 ? 'small' : _props$size,
|
|
47
|
-
createOption = props.createOption,
|
|
48
|
-
_props$search = props.search,
|
|
49
|
-
search = _props$search === void 0 ? false : _props$search,
|
|
50
|
-
_props$create = props.create,
|
|
51
|
-
create = _props$create === void 0 ? false : _props$create,
|
|
52
|
-
options = props.options,
|
|
53
|
-
_props$name = props.name,
|
|
54
|
-
name = _props$name === void 0 ? '' : _props$name,
|
|
55
|
-
_props$bordered = props.bordered,
|
|
56
|
-
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
57
|
-
className = props.className,
|
|
58
|
-
_onChange = props.onChange,
|
|
34
|
+
var overlayWidth = props.overlayWidth,
|
|
35
|
+
labelField = props.labelField,
|
|
36
|
+
keyField = props.keyField,
|
|
59
37
|
res = _objectWithoutProperties(props, _excluded);
|
|
60
38
|
|
|
61
|
-
var _useState = useState(
|
|
39
|
+
var _useState = useState(),
|
|
62
40
|
_useState2 = _slicedToArray(_useState, 2),
|
|
63
|
-
|
|
64
|
-
|
|
41
|
+
current = _useState2[0],
|
|
42
|
+
setCurrent = _useState2[1];
|
|
65
43
|
|
|
66
|
-
var _useState3 = useState(
|
|
44
|
+
var _useState3 = useState(''),
|
|
67
45
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
68
|
-
|
|
69
|
-
|
|
46
|
+
searchValue = _useState4[0],
|
|
47
|
+
setSearchValue = _useState4[1];
|
|
70
48
|
|
|
71
|
-
var _useState5 = useState(
|
|
49
|
+
var _useState5 = useState(false),
|
|
72
50
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
73
|
-
|
|
74
|
-
|
|
51
|
+
visible = _useState6[0],
|
|
52
|
+
setVisible = _useState6[1];
|
|
75
53
|
|
|
76
|
-
var
|
|
54
|
+
var selectRef = useRef(null);
|
|
55
|
+
var boxRef = useRef(null);
|
|
56
|
+
var selectId = Math.random().toString();
|
|
57
|
+
|
|
58
|
+
var _useState7 = useState(200),
|
|
77
59
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
78
|
-
|
|
79
|
-
|
|
60
|
+
width = _useState8[0],
|
|
61
|
+
setWidth = _useState8[1];
|
|
80
62
|
|
|
81
63
|
useEffect(function () {
|
|
82
|
-
|
|
64
|
+
setWidth(boxRef.current.width || 200);
|
|
83
65
|
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
return data;
|
|
87
|
-
});
|
|
66
|
+
if (props.defaultValue) {
|
|
67
|
+
setCurrent(getValue(props.defaultValue));
|
|
88
68
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
value: searchValue,
|
|
115
|
-
placeholder: "\u641C\u7D22".concat(name),
|
|
116
|
-
onChange: function onChange(e) {
|
|
117
|
-
var value = e.target.value;
|
|
118
|
-
setSearchValue(function () {
|
|
119
|
-
return value;
|
|
120
|
-
});
|
|
121
|
-
var reg = new RegExp(value);
|
|
122
|
-
setCurrentOption(function () {
|
|
123
|
-
return originalOption.filter(function (item) {
|
|
124
|
-
return reg.test(item[fieldNames.label] || item);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}), create && /*#__PURE__*/React.createElement("div", {
|
|
129
|
-
className: "biz-icon-add mb-12",
|
|
130
|
-
onClick: function onClick() {
|
|
131
|
-
return createOption && createOption();
|
|
132
|
-
}
|
|
133
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
134
|
-
className: "biz-icon",
|
|
135
|
-
type: 'icon-tianjia1'
|
|
136
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
137
|
-
className: "biz-icon-text"
|
|
138
|
-
}, "\u6DFB\u52A0".concat(name))), menu);
|
|
139
|
-
},
|
|
140
|
-
onChange: function onChange(value, option) {
|
|
141
|
-
setSelectValue(function () {
|
|
142
|
-
return value;
|
|
69
|
+
|
|
70
|
+
var handleClick = function handleClick(e) {
|
|
71
|
+
var clicked = selectRef.current.contains(e.target);
|
|
72
|
+
boxRef.current.create(clicked);
|
|
73
|
+
|
|
74
|
+
if (!clicked && !props.enableCreate) {
|
|
75
|
+
setSearchValue('');
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
window.addEventListener('click', handleClick);
|
|
80
|
+
return function () {
|
|
81
|
+
window.removeEventListener('click', handleClick);
|
|
82
|
+
};
|
|
83
|
+
}, []);
|
|
84
|
+
useEffect(function () {
|
|
85
|
+
if (!props.value) return;
|
|
86
|
+
setCurrent(getValue(props.value));
|
|
87
|
+
}, [props.value]);
|
|
88
|
+
|
|
89
|
+
var getValue = function getValue(data) {
|
|
90
|
+
if (props.multiple) {
|
|
91
|
+
var result = [];
|
|
92
|
+
data.forEach(function (item) {
|
|
93
|
+
result === null || result === void 0 ? void 0 : result.push(getCheckedData(item));
|
|
143
94
|
});
|
|
144
|
-
|
|
95
|
+
return result;
|
|
96
|
+
} else {
|
|
97
|
+
return getCheckedData(data);
|
|
145
98
|
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
dangerouslySetInnerHTML: {
|
|
160
|
-
__html: util.setHighLight(item[fieldNames.label] || item, searchValue)
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var getCheckedData = function getCheckedData(data) {
|
|
102
|
+
var result = data;
|
|
103
|
+
props.options.forEach(function (option) {
|
|
104
|
+
if (props.type === 'group') {
|
|
105
|
+
option.children.forEach(function (child) {
|
|
106
|
+
if (data[keyField] === child[keyField]) {
|
|
107
|
+
result = child;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
} else if (data[keyField] === option[keyField]) {
|
|
111
|
+
result = option;
|
|
161
112
|
}
|
|
162
|
-
})
|
|
163
|
-
|
|
113
|
+
});
|
|
114
|
+
return result;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
var onDelete = function onDelete(option) {
|
|
118
|
+
var data = _.cloneDeep(current);
|
|
119
|
+
|
|
120
|
+
data.forEach(function (item, index) {
|
|
121
|
+
if (item[keyField] === option[keyField]) {
|
|
122
|
+
data.splice(index, 1);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
setCurrent(data);
|
|
127
|
+
if (props.onChange) props.onChange(data);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
var onCreate = function onCreate(val) {
|
|
131
|
+
var _newItem;
|
|
132
|
+
|
|
133
|
+
var data = _.cloneDeep(current) || [];
|
|
134
|
+
var newItem = (_newItem = {}, _defineProperty(_newItem, keyField, val), _defineProperty(_newItem, labelField, val), _newItem);
|
|
135
|
+
var flag = false;
|
|
136
|
+
current === null || current === void 0 ? void 0 : current.forEach(function (item) {
|
|
137
|
+
if (item[labelField] === val) {
|
|
138
|
+
flag = true;
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
setSearchValue('');
|
|
143
|
+
|
|
144
|
+
if (!flag) {
|
|
145
|
+
newItem = getCheckedData(newItem);
|
|
146
|
+
data.push(newItem);
|
|
147
|
+
setCurrent(data);
|
|
148
|
+
if (props.onChange) props.onChange(data);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var onChange = function onChange(option) {
|
|
153
|
+
setCurrent(option);
|
|
154
|
+
setSearchValue('');
|
|
155
|
+
|
|
156
|
+
if (!props.multiple) {
|
|
157
|
+
setVisible(false);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (props.onChange) props.onChange(option);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
var onVisibleChange = function onVisibleChange(flag) {
|
|
164
|
+
setVisible(flag);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
168
|
+
overlay: /*#__PURE__*/React.createElement(SelectOverlay, _objectSpread(_objectSpread({}, res), {}, {
|
|
169
|
+
value: current,
|
|
170
|
+
labelField: labelField,
|
|
171
|
+
keyField: keyField,
|
|
172
|
+
searchValue: searchValue,
|
|
173
|
+
onChange: onChange
|
|
174
|
+
})),
|
|
175
|
+
disabled: props.disable,
|
|
176
|
+
destroyPopupOnHide: true,
|
|
177
|
+
overlayStyle: {
|
|
178
|
+
minWidth: 0,
|
|
179
|
+
width: overlayWidth || width
|
|
180
|
+
},
|
|
181
|
+
trigger: ['click'],
|
|
182
|
+
getPopupContainer: props.popupContainer || props.multiple ? function () {
|
|
183
|
+
return document.getElementById(selectId);
|
|
184
|
+
} : undefined,
|
|
185
|
+
visible: visible,
|
|
186
|
+
onVisibleChange: onVisibleChange
|
|
187
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
188
|
+
className: "".concat(classPrefix, "-handle ").concat(props.className ? props.className : ''),
|
|
189
|
+
ref: selectRef,
|
|
190
|
+
id: selectId
|
|
191
|
+
}, /*#__PURE__*/React.createElement(SelectHandle, {
|
|
192
|
+
ref: boxRef,
|
|
193
|
+
value: current,
|
|
194
|
+
labelField: labelField,
|
|
195
|
+
keyField: keyField,
|
|
196
|
+
disable: props.disable,
|
|
197
|
+
multiple: props.multiple,
|
|
198
|
+
enableCreate: props.enableCreate,
|
|
199
|
+
theme: props.theme,
|
|
200
|
+
size: props.size,
|
|
201
|
+
border: props.border,
|
|
202
|
+
onDelete: onDelete,
|
|
203
|
+
onSearch: setSearchValue,
|
|
204
|
+
onCreate: onCreate
|
|
205
|
+
})));
|
|
164
206
|
};
|
|
165
207
|
|
|
208
|
+
BizSelect.defaultProps = {
|
|
209
|
+
labelField: 'label',
|
|
210
|
+
keyField: 'id'
|
|
211
|
+
};
|
|
166
212
|
export default BizSelect;
|