@chaoswise/ui 3.1.8 → 3.1.9
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/Button/index.style.js +4 -2
- package/lib/CWSelect/index.js +8 -233
- package/package.json +1 -1
|
@@ -11,11 +11,13 @@ var prepareComponentToken = function prepareComponentToken(token) {
|
|
|
11
11
|
var genCustomButtonStyle = function genCustomButtonStyle(token) {
|
|
12
12
|
var prefixCls = token.antCls;
|
|
13
13
|
var componentCls = "".concat(prefixCls, "-btn");
|
|
14
|
-
return _defineProperty({}, "".concat(componentCls).concat(componentCls, "-wrapper"), _defineProperty(_defineProperty(_defineProperty({
|
|
14
|
+
return _defineProperty({}, "".concat(componentCls).concat(componentCls, "-wrapper"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
15
15
|
display: "inline-flex !important",
|
|
16
16
|
alignItems: "center",
|
|
17
17
|
justifyContent: "center"
|
|
18
|
-
}, "
|
|
18
|
+
}, "".concat(componentCls, "-icon"), {
|
|
19
|
+
display: "inline-flex"
|
|
20
|
+
}), "&".concat(componentCls, "-text,&").concat(componentCls, "-link"), {
|
|
19
21
|
padding: "0 !important",
|
|
20
22
|
border: "none !important",
|
|
21
23
|
height: "20px",
|
package/lib/CWSelect/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
import _Checkbox from "@chaoswise/ui/lib/Checkbox";
|
|
3
2
|
import _Tooltip from "@chaoswise/ui/lib/Tooltip";
|
|
4
3
|
import _Tag from "@chaoswise/ui/lib/Tag";
|
|
5
|
-
var _excluded = ["selectLabel", "label", "prefix", "defaultValue", "mode", "value", "labelInValue", "onChange", "onSelect", "onDeselect", "onDragEnd", "tagRender", "allowDrag", "maxTagCount", "
|
|
4
|
+
var _excluded = ["selectLabel", "label", "prefix", "defaultValue", "mode", "value", "labelInValue", "onChange", "onSelect", "onDeselect", "onDragEnd", "tagRender", "allowDrag", "maxTagCount", "tagLabelRender", "maxTagTextLength", "dropdownRender", "children", "maxCount"];
|
|
6
5
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
7
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
10
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
11
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
8
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -34,38 +29,6 @@ import PropTypes from "prop-types";
|
|
|
34
29
|
import { useIntl } from "../locales";
|
|
35
30
|
import useStyle from "./index.style";
|
|
36
31
|
|
|
37
|
-
/**
|
|
38
|
-
* 多选模式的默认配置选项
|
|
39
|
-
* @type {Object}
|
|
40
|
-
* @property {boolean} showCheckbox - 是否显示复选框
|
|
41
|
-
* @property {boolean} showSelectAll - 是否显示全选选项
|
|
42
|
-
* @property {boolean} isCheckboxMultipleHasSelectAll - 复选框多选模式是否包含全选功能
|
|
43
|
-
*/
|
|
44
|
-
var DEFAULT_MULTIPLE_OPTIONS = {
|
|
45
|
-
showCheckbox: false,
|
|
46
|
-
showSelectAll: true,
|
|
47
|
-
isCheckboxMultipleHasSelectAll: true
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 安全获取嵌套对象属性值的辅助函数
|
|
52
|
-
* @param {Object} obj - 目标对象
|
|
53
|
-
* @param {Array} path - 属性路径数组
|
|
54
|
-
* @param {*} defaultValue - 默认值
|
|
55
|
-
* @returns {*} 获取到的值或默认值
|
|
56
|
-
*/
|
|
57
|
-
var getNestedValue = function getNestedValue(obj, path) {
|
|
58
|
-
var defaultValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
59
|
-
try {
|
|
60
|
-
var _path$reduce;
|
|
61
|
-
return (_path$reduce = path.reduce(function (current, key) {
|
|
62
|
-
return current === null || current === void 0 ? void 0 : current[key];
|
|
63
|
-
}, obj)) !== null && _path$reduce !== void 0 ? _path$reduce : defaultValue;
|
|
64
|
-
} catch (_unused) {
|
|
65
|
-
return defaultValue;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
32
|
/**
|
|
70
33
|
* 检查是否为有效数组(非空数组)的辅助函数
|
|
71
34
|
* @param {*} arr - 待检查的值
|
|
@@ -77,7 +40,7 @@ var isValidArray = function isValidArray(arr) {
|
|
|
77
40
|
|
|
78
41
|
/**
|
|
79
42
|
* CWSelect 组件 - 增强版的 Select 选择器
|
|
80
|
-
*
|
|
43
|
+
* 支持多选、拖拽排序、标签自定义等功能
|
|
81
44
|
*
|
|
82
45
|
* @param {Object} props - 组件属性
|
|
83
46
|
* @param {React.Ref} ref - 组件引用
|
|
@@ -104,18 +67,12 @@ var CWSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
104
67
|
_props$allowDrag = props.allowDrag,
|
|
105
68
|
allowDrag = _props$allowDrag === void 0 ? false : _props$allowDrag,
|
|
106
69
|
maxTagCount = props.maxTagCount,
|
|
107
|
-
_props$showCheckbox = props.showCheckbox,
|
|
108
|
-
showCheckbox = _props$showCheckbox === void 0 ? false : _props$showCheckbox,
|
|
109
70
|
tagLabelRender = props.tagLabelRender,
|
|
110
71
|
maxTagTextLength = props.maxTagTextLength,
|
|
111
72
|
dropdownRender = props.dropdownRender,
|
|
112
|
-
_props$multipleOption = props.multipleOptions,
|
|
113
|
-
multipleOptions = _props$multipleOption === void 0 ? DEFAULT_MULTIPLE_OPTIONS : _props$multipleOption,
|
|
114
73
|
children = props.children,
|
|
115
74
|
maxCount = props.maxCount,
|
|
116
75
|
rest = _objectWithoutProperties(props, _excluded);
|
|
117
|
-
|
|
118
|
-
// 获取国际化和样式相关的 hooks
|
|
119
76
|
var intl = useIntl();
|
|
120
77
|
var _useConfigContext = useConfigContext(),
|
|
121
78
|
getPrefixCls = _useConfigContext.getPrefixCls;
|
|
@@ -148,22 +105,6 @@ var CWSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
148
105
|
return prefix || label || selectLabel;
|
|
149
106
|
}, [prefix, label, selectLabel]);
|
|
150
107
|
|
|
151
|
-
/**
|
|
152
|
-
* 判断是否应该显示复选框
|
|
153
|
-
* 条件:多选模式 && (showCheckbox 为 true 或 multipleOptions.showCheckbox 为 true)
|
|
154
|
-
*/
|
|
155
|
-
var shouldShowCheckbox = useMemo(function () {
|
|
156
|
-
return mode === "multiple" && (showCheckbox || multipleOptions.showCheckbox);
|
|
157
|
-
}, [mode, showCheckbox, multipleOptions.showCheckbox]);
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* 判断是否应该显示全选功能
|
|
161
|
-
* 条件:配置允许全选 && 没有设置最大选择数量 && 显示复选框
|
|
162
|
-
*/
|
|
163
|
-
var shouldShowCheckAll = useMemo(function () {
|
|
164
|
-
return multipleOptions.isCheckboxMultipleHasSelectAll && !("maxCount" in props) && shouldShowCheckbox;
|
|
165
|
-
}, [multipleOptions.isCheckboxMultipleHasSelectAll, props, shouldShowCheckbox]);
|
|
166
|
-
|
|
167
108
|
/**
|
|
168
109
|
* 从数组值构建键值索引映射的函数
|
|
169
110
|
* @param {Array|*} _value - 输入值
|
|
@@ -196,7 +137,7 @@ var CWSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
196
137
|
return key !== undefined && key !== null;
|
|
197
138
|
});
|
|
198
139
|
keyIndexMapRef.current = newKeyIndexMap;
|
|
199
|
-
//
|
|
140
|
+
// fixed 节点详情拿不到
|
|
200
141
|
setTimeout(function () {
|
|
201
142
|
return setAllInstance(allKeys);
|
|
202
143
|
}, 0);
|
|
@@ -374,161 +315,6 @@ var CWSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
374
315
|
return null;
|
|
375
316
|
}, [allowDrag, maxTagCount, renderTag, moveNode, tagDropdownOverlay, prefixCls, rest.disabled, handlePreventMouseDown, activeKey, allOptions, handleChange, onDeselect, maxTagTextLength, tagLabelRender]);
|
|
376
317
|
|
|
377
|
-
/**
|
|
378
|
-
* 处理全选/取消全选的回调函数
|
|
379
|
-
* @param {Event} e - 复选框事件
|
|
380
|
-
* @param {Array} currentDataSource - 当前数据源
|
|
381
|
-
* @param {Array} originDataSource - 原始数据源
|
|
382
|
-
*/
|
|
383
|
-
var handleCheckAllChange = useCallback(function (e, currentDataSource, originDataSource) {
|
|
384
|
-
if (!isValidArray(currentDataSource)) return;
|
|
385
|
-
var isChecked = e.target.checked;
|
|
386
|
-
|
|
387
|
-
// 获取原始激活的数据源
|
|
388
|
-
var originActiveDataSource = originDataSource.filter(function (item) {
|
|
389
|
-
return activeKey.some(function (activeItem) {
|
|
390
|
-
return labelInValue ? (activeItem === null || activeItem === void 0 ? void 0 : activeItem.value) === (item === null || item === void 0 ? void 0 : item.value) : activeItem === (item === null || item === void 0 ? void 0 : item.value);
|
|
391
|
-
});
|
|
392
|
-
});
|
|
393
|
-
|
|
394
|
-
// 转换当前数据源为键值格式
|
|
395
|
-
var currentDataSourceKeys = currentDataSource.map(function (item) {
|
|
396
|
-
return labelInValue ? {
|
|
397
|
-
value: item === null || item === void 0 ? void 0 : item.value,
|
|
398
|
-
label: item === null || item === void 0 ? void 0 : item.children
|
|
399
|
-
} : item === null || item === void 0 ? void 0 : item.value;
|
|
400
|
-
}).filter(Boolean);
|
|
401
|
-
var newActiveKey = [];
|
|
402
|
-
var newActiveDataSource = [];
|
|
403
|
-
if (isChecked) {
|
|
404
|
-
// 全选:合并原有选中项和当前数据源
|
|
405
|
-
newActiveDataSource = Array.from(new Set([].concat(_toConsumableArray(originActiveDataSource), _toConsumableArray(currentDataSource))));
|
|
406
|
-
newActiveKey = Array.from(new Set([].concat(_toConsumableArray(activeKey), _toConsumableArray(currentDataSourceKeys))));
|
|
407
|
-
onSelect(currentDataSourceKeys, currentDataSource);
|
|
408
|
-
} else {
|
|
409
|
-
// 取消全选:从原有选中项中移除当前数据源
|
|
410
|
-
newActiveDataSource = originActiveDataSource.filter(function (item) {
|
|
411
|
-
return !currentDataSource.some(function (current) {
|
|
412
|
-
return (current === null || current === void 0 ? void 0 : current.value) === (item === null || item === void 0 ? void 0 : item.value);
|
|
413
|
-
});
|
|
414
|
-
});
|
|
415
|
-
newActiveKey = activeKey.filter(function (item) {
|
|
416
|
-
return !currentDataSourceKeys.some(function (current) {
|
|
417
|
-
return labelInValue ? (item === null || item === void 0 ? void 0 : item.value) === (current === null || current === void 0 ? void 0 : current.value) : item === current;
|
|
418
|
-
});
|
|
419
|
-
});
|
|
420
|
-
onDeselect(currentDataSourceKeys, currentDataSource);
|
|
421
|
-
}
|
|
422
|
-
handleChange(newActiveKey, newActiveDataSource);
|
|
423
|
-
}, [activeKey, labelInValue, onSelect, onDeselect, handleChange]);
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* 自定义下拉框渲染函数
|
|
427
|
-
* 处理复选框模式下的全选功能和空状态显示
|
|
428
|
-
* @param {React.ReactNode} originNode - 原始下拉框节点
|
|
429
|
-
* @returns {React.ReactNode} 自定义渲染的下拉框内容
|
|
430
|
-
*/
|
|
431
|
-
var customDropdownRender = useCallback(function (originNode) {
|
|
432
|
-
// 从 React 内部属性中获取下拉框的状态数据
|
|
433
|
-
var memoizedProps = getNestedValue(originNode, ["_owner", "return", "memoizedProps", "value"], {});
|
|
434
|
-
var flattenOptions = memoizedProps.flattenOptions || [];
|
|
435
|
-
var originDataSource = memoizedProps.options || [];
|
|
436
|
-
var activeValues = Array.from(memoizedProps.rawValues || []);
|
|
437
|
-
|
|
438
|
-
// 提取有效的数据源(过滤掉分组选项)
|
|
439
|
-
var dataSource = flattenOptions.filter(function (item) {
|
|
440
|
-
return item && Object.prototype.hasOwnProperty.call(item, "groupOption");
|
|
441
|
-
}).map(function (item) {
|
|
442
|
-
return item.data;
|
|
443
|
-
}).filter(Boolean);
|
|
444
|
-
|
|
445
|
-
// 空状态处理:没有数据时显示空状态提示
|
|
446
|
-
if (!isValidArray(dataSource)) {
|
|
447
|
-
var emptyContent = rest.notFoundContent || /*#__PURE__*/React.createElement("div", {
|
|
448
|
-
className: "".concat(prefixCls, "-show-checkbox-empty")
|
|
449
|
-
}, intl.get("812f44fc-ed3c-4bd3-8ad5-35cd2996c5ae").d("未查找到任何结果"));
|
|
450
|
-
return emptyContent;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
// 计算全选状态
|
|
454
|
-
var dataSourceValues = dataSource.map(function (item) {
|
|
455
|
-
return item === null || item === void 0 ? void 0 : item.value;
|
|
456
|
-
}).filter(Boolean);
|
|
457
|
-
var filterActiveValues = dataSourceValues.filter(function (value) {
|
|
458
|
-
return activeValues.includes(value);
|
|
459
|
-
});
|
|
460
|
-
var isAllSelected = filterActiveValues.length === dataSource.length && dataSource.length > 0;
|
|
461
|
-
var isIndeterminate = filterActiveValues.length > 0 && !isAllSelected;
|
|
462
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, shouldShowCheckAll && /*#__PURE__*/React.createElement("div", {
|
|
463
|
-
className: "".concat(prefixCls, "-check-all"),
|
|
464
|
-
onMouseDown: handlePreventMouseDown
|
|
465
|
-
}, /*#__PURE__*/React.createElement(_Checkbox, {
|
|
466
|
-
indeterminate: isIndeterminate // 半选状态
|
|
467
|
-
,
|
|
468
|
-
checked: isAllSelected // 全选状态
|
|
469
|
-
,
|
|
470
|
-
onChange: function onChange(e) {
|
|
471
|
-
return handleCheckAllChange(e, dataSource, originDataSource);
|
|
472
|
-
},
|
|
473
|
-
style: {
|
|
474
|
-
width: "100%"
|
|
475
|
-
}
|
|
476
|
-
}, intl.get("3991a1d0-65a8-45ca-94a4-f89fbd9f8555").d("全选"), "\uFF08", filterActiveValues.length, "/", dataSource.length, "\uFF09")), originNode);
|
|
477
|
-
}, [shouldShowCheckAll, prefixCls, handlePreventMouseDown, handleCheckAllChange, intl, rest.notFoundContent]);
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* 渲染复选框选项的函数
|
|
481
|
-
* @param {React.ReactElement} child - 子选项元素
|
|
482
|
-
* @returns {React.ReactElement|null} 渲染的复选框选项
|
|
483
|
-
*/
|
|
484
|
-
var renderCheckboxItem = useCallback(function (child) {
|
|
485
|
-
if (!(child !== null && child !== void 0 && child.props)) return null;
|
|
486
|
-
var childValue = child.props.value;
|
|
487
|
-
// 判断当前选项是否被选中
|
|
488
|
-
var isChecked = labelInValue ? activeKey.some(function (item) {
|
|
489
|
-
return (item === null || item === void 0 ? void 0 : item.value) === childValue;
|
|
490
|
-
}) : activeKey.includes(childValue);
|
|
491
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
492
|
-
key: child.key || childValue,
|
|
493
|
-
className: "".concat(prefixCls, "-checkbox-item")
|
|
494
|
-
}, /*#__PURE__*/React.createElement(_Checkbox, {
|
|
495
|
-
disabled: child.props.disabled,
|
|
496
|
-
checked: isChecked
|
|
497
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
498
|
-
className: "".concat(prefixCls, "-item-children")
|
|
499
|
-
}, child.props.children));
|
|
500
|
-
}, [activeKey, labelInValue, prefixCls]);
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* 处理子元素,在复选框模式下为每个选项添加复选框
|
|
504
|
-
*/
|
|
505
|
-
var processedChildren = useMemo(function () {
|
|
506
|
-
if (!shouldShowCheckbox || !children) return children;
|
|
507
|
-
return React.Children.map(children, function (child) {
|
|
508
|
-
var _child$props, _child$props2;
|
|
509
|
-
if (!child) return null;
|
|
510
|
-
|
|
511
|
-
// 处理选项组(OptGroup)
|
|
512
|
-
if (Array.isArray((_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.children)) {
|
|
513
|
-
var groupChildren = React.Children.map(child.props.children, function (optGroupChild) {
|
|
514
|
-
var _optGroupChild$props;
|
|
515
|
-
if (!optGroupChild) return null;
|
|
516
|
-
return /*#__PURE__*/React.cloneElement(optGroupChild, {
|
|
517
|
-
key: optGroupChild.key || ((_optGroupChild$props = optGroupChild.props) === null || _optGroupChild$props === void 0 ? void 0 : _optGroupChild$props.value)
|
|
518
|
-
}, renderCheckboxItem(optGroupChild));
|
|
519
|
-
}).filter(Boolean);
|
|
520
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
521
|
-
key: child.key
|
|
522
|
-
}, groupChildren);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
// 处理普通选项
|
|
526
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
527
|
-
key: child.key || ((_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.value)
|
|
528
|
-
}, renderCheckboxItem(child));
|
|
529
|
-
}).filter(Boolean);
|
|
530
|
-
}, [shouldShowCheckbox, children, renderCheckboxItem]);
|
|
531
|
-
|
|
532
318
|
/**
|
|
533
319
|
* 计算最终的 value 值
|
|
534
320
|
* 受控模式:使用传入的 value
|
|
@@ -538,8 +324,8 @@ var CWSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
538
324
|
if ("value" in props) {
|
|
539
325
|
return value;
|
|
540
326
|
}
|
|
541
|
-
return
|
|
542
|
-
}, [props, value,
|
|
327
|
+
return allowDrag ? activeKey : value;
|
|
328
|
+
}, [props, value, allowDrag, activeKey]);
|
|
543
329
|
|
|
544
330
|
// 渲染组件
|
|
545
331
|
return wrapCSSVar(/*#__PURE__*/React.createElement(DndProvider, {
|
|
@@ -555,10 +341,10 @@ var CWSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
555
341
|
menuItemSelectedIcon: null,
|
|
556
342
|
onSelect: onSelect,
|
|
557
343
|
onDeselect: onDeselect,
|
|
558
|
-
dropdownRender: dropdownRender
|
|
344
|
+
dropdownRender: dropdownRender,
|
|
559
345
|
labelInValue: labelInValue,
|
|
560
346
|
maxCount: maxCount
|
|
561
|
-
}, rest),
|
|
347
|
+
}, rest), children)));
|
|
562
348
|
});
|
|
563
349
|
|
|
564
350
|
// PropTypes 类型定义
|
|
@@ -601,22 +387,11 @@ CWSelect.propTypes = {
|
|
|
601
387
|
// 是否允许拖拽
|
|
602
388
|
onDragEnd: PropTypes.func,
|
|
603
389
|
// 拖拽结束回调
|
|
604
|
-
showCheckbox: PropTypes.bool,
|
|
605
|
-
// 是否显示复选框
|
|
606
390
|
listHeight: PropTypes.number,
|
|
607
391
|
// 列表高度
|
|
608
392
|
selectLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
609
393
|
// 选择器标签
|
|
610
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
611
|
-
// 标签
|
|
612
|
-
multipleOptions: PropTypes.shape({
|
|
613
|
-
// 多选配置选项
|
|
614
|
-
showCheckbox: PropTypes.bool,
|
|
615
|
-
// 是否显示复选框
|
|
616
|
-
showSelectAll: PropTypes.bool,
|
|
617
|
-
// 是否显示全选
|
|
618
|
-
isCheckboxMultipleHasSelectAll: PropTypes.bool // 复选框多选是否包含全选
|
|
619
|
-
})
|
|
394
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]) // 标签
|
|
620
395
|
};
|
|
621
396
|
|
|
622
397
|
// 设置组件显示名称
|