gxxc-ui 1.0.50 → 1.0.51
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/dist/SelectUI/index.js +8 -2
- package/package.json +1 -1
package/dist/SelectUI/index.js
CHANGED
|
@@ -27,7 +27,8 @@ var SelectUI = function SelectUI(props) {
|
|
|
27
27
|
var _props$options = props.options,
|
|
28
28
|
options = _props$options === void 0 ? [] : _props$options,
|
|
29
29
|
filterOption = props.filterOption,
|
|
30
|
-
filterSort = props.filterSort,
|
|
30
|
+
_props$filterSort = props.filterSort,
|
|
31
|
+
filterSort = _props$filterSort === void 0 ? false : _props$filterSort,
|
|
31
32
|
fieldNames = props.fieldNames,
|
|
32
33
|
onChange = props.onChange,
|
|
33
34
|
value = props.value,
|
|
@@ -66,6 +67,11 @@ var SelectUI = function SelectUI(props) {
|
|
|
66
67
|
setSelecValue(value);
|
|
67
68
|
if (onChange) onChange(value, option);
|
|
68
69
|
};
|
|
70
|
+
var getFilterSort = function getFilterSort() {
|
|
71
|
+
if (filterSort === false) return undefined; // 显式禁用
|
|
72
|
+
if (filterSort === true) return defaultFilterSort; // 强制默认
|
|
73
|
+
return filterSort !== null && filterSort !== void 0 ? filterSort : defaultFilterSort; // 函数自定义 or 隐式兜底
|
|
74
|
+
};
|
|
69
75
|
return /*#__PURE__*/React.createElement("div", {
|
|
70
76
|
className: "selectUI"
|
|
71
77
|
}, /*#__PURE__*/React.createElement(Select, _extends({
|
|
@@ -75,7 +81,7 @@ var SelectUI = function SelectUI(props) {
|
|
|
75
81
|
allowClear: true,
|
|
76
82
|
optionFilterProp: "label",
|
|
77
83
|
filterOption: filterOption !== null && filterOption !== void 0 ? filterOption : defaultFilterOption,
|
|
78
|
-
filterSort:
|
|
84
|
+
filterSort: getFilterSort,
|
|
79
85
|
fieldNames: fieldNames,
|
|
80
86
|
onChange: changeSelect
|
|
81
87
|
}, otherProps)), copy && /*#__PURE__*/React.createElement(IconUI, {
|