@zat-design/sisyphus-react 3.4.13-beta.6 → 3.4.13-beta.8
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/ProEditTable/index.js +7 -2
- package/es/ProForm/components/combination/ProModalSelect/index.js +2 -1
- package/es/ProSelect/index.js +56 -61
- package/es/ProSelect/index.less +5 -0
- package/lib/ProEditTable/index.js +7 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.js +2 -1
- package/lib/ProSelect/index.js +58 -61
- package/lib/ProSelect/index.less +5 -0
- package/package.json +1 -1
package/es/ProEditTable/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
9
9
|
import "antd/es/form/style";
|
|
10
10
|
import _Form from "antd/es/form";
|
|
11
11
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
12
|
-
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey", "rowDisabled", "footerRender"];
|
|
12
|
+
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey", "rowDisabled", "footerRender", "scroll"];
|
|
13
13
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
15
15
|
import { get, isArray } from 'lodash';
|
|
@@ -51,6 +51,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
51
51
|
rowKey = _ref.rowKey,
|
|
52
52
|
rowDisabled = _ref.rowDisabled,
|
|
53
53
|
footerRender = _ref.footerRender,
|
|
54
|
+
scroll = _ref.scroll,
|
|
54
55
|
resetProps = _objectWithoutProperties(_ref, _excluded);
|
|
55
56
|
// 上下文form
|
|
56
57
|
var contentForm = _Form.useFormInstance();
|
|
@@ -346,7 +347,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
346
347
|
pageSize: page.pageSize,
|
|
347
348
|
showSizeChanger: false,
|
|
348
349
|
showQuickJumper: true,
|
|
349
|
-
total: value.length,
|
|
350
|
+
total: value === null || value === void 0 ? void 0 : value.length,
|
|
350
351
|
showTotal: function showTotal(total) {
|
|
351
352
|
var _locale$ProEditTable;
|
|
352
353
|
if (!total) return;
|
|
@@ -357,6 +358,10 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
357
358
|
onChange: handlePageChange
|
|
358
359
|
}, pagination) : false,
|
|
359
360
|
rowKey: "rowKey",
|
|
361
|
+
scroll: {
|
|
362
|
+
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
363
|
+
y: (value === null || value === void 0 ? void 0 : value.length) ? scroll === null || scroll === void 0 ? void 0 : scroll.y : undefined
|
|
364
|
+
},
|
|
360
365
|
summary: _summary
|
|
361
366
|
}))]
|
|
362
367
|
}), !isView && (value === null || value === void 0 ? void 0 : value.length) ? _jsx("div", {
|
|
@@ -706,7 +706,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
706
706
|
}, 2000),
|
|
707
707
|
style: {
|
|
708
708
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
|
709
|
-
}
|
|
709
|
+
},
|
|
710
|
+
className: "ant-select-compact-item"
|
|
710
711
|
}, omit(restProps, ['otherProps']))) : _jsx(_Input, _objectSpread({
|
|
711
712
|
value: viewText,
|
|
712
713
|
onChange: handleChangeValue,
|
package/es/ProSelect/index.js
CHANGED
|
@@ -63,12 +63,8 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
63
63
|
_useState2 = _slicedToArray(_useState, 2),
|
|
64
64
|
viewFlag = _useState2[0],
|
|
65
65
|
setViewFlag = _useState2[1];
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
inputEl = _useState4[0],
|
|
69
|
-
setInputEl = _useState4[1];
|
|
70
|
-
var refSelect1 = useRef((Math.random() * 100).toFixed(0));
|
|
71
|
-
var _useInViewport = useInViewport(inputEl),
|
|
66
|
+
var refSelect1 = useRef();
|
|
67
|
+
var _useInViewport = useInViewport(refSelect1),
|
|
72
68
|
_useInViewport2 = _slicedToArray(_useInViewport, 1),
|
|
73
69
|
inViewport = _useInViewport2[0];
|
|
74
70
|
selectProps.showCodeName = (_selectProps$showCode = selectProps.showCodeName) !== null && _selectProps$showCode !== void 0 ? _selectProps$showCode : showCodeName;
|
|
@@ -81,15 +77,15 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
81
77
|
code = fieldNames.value;
|
|
82
78
|
label = fieldNames.label;
|
|
83
79
|
}
|
|
84
|
-
var
|
|
85
|
-
|
|
86
|
-
selectList =
|
|
87
|
-
setSelectList =
|
|
80
|
+
var _useState3 = useState(dataSource || []),
|
|
81
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
82
|
+
selectList = _useState4[0],
|
|
83
|
+
setSelectList = _useState4[1];
|
|
88
84
|
// 用来控制只有第一次才会设置 defaultOne 属性、🔒
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
isDefaultOne =
|
|
92
|
-
setIsDefaultOne =
|
|
85
|
+
var _useState5 = useState(false),
|
|
86
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
87
|
+
isDefaultOne = _useState6[0],
|
|
88
|
+
setIsDefaultOne = _useState6[1];
|
|
93
89
|
var OptionRender = optionRender;
|
|
94
90
|
var defaultOnSuccessFun = function defaultOnSuccessFun(res) {
|
|
95
91
|
var _res$status = res.status,
|
|
@@ -160,12 +156,6 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
160
156
|
setViewFlag(true);
|
|
161
157
|
}
|
|
162
158
|
}, [inViewport]);
|
|
163
|
-
useEffect(function () {
|
|
164
|
-
var el = document.getElementById(refSelect1 === null || refSelect1 === void 0 ? void 0 : refSelect1.current);
|
|
165
|
-
if (el) {
|
|
166
|
-
setInputEl(el);
|
|
167
|
-
}
|
|
168
|
-
}, []);
|
|
169
159
|
// disable默认值
|
|
170
160
|
if (defaultDisableValue) {
|
|
171
161
|
return _jsx("span", {
|
|
@@ -310,46 +300,51 @@ export var ProSelect = function ProSelect(props, ref) {
|
|
|
310
300
|
fieldNames: fieldNames
|
|
311
301
|
});
|
|
312
302
|
}
|
|
313
|
-
return _jsx(
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
303
|
+
return _jsx("div", {
|
|
304
|
+
ref: refSelect1,
|
|
305
|
+
style: props.style,
|
|
306
|
+
className: props.className,
|
|
307
|
+
children: _jsx(_Select, _objectSpread(_objectSpread({
|
|
308
|
+
// id={refSelect1.current}
|
|
309
|
+
placeholder: locale === null || locale === void 0 ? void 0 : (_locale$ProSelect = locale.ProSelect) === null || _locale$ProSelect === void 0 ? void 0 : _locale$ProSelect.select,
|
|
310
|
+
allowClear: true,
|
|
311
|
+
showArrow: true,
|
|
312
|
+
loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading,
|
|
313
|
+
onChange: handleChange,
|
|
314
|
+
optionLabelProp: "children" // 解决warning报错,添加默认值
|
|
315
|
+
,
|
|
316
|
+
showSearch: true,
|
|
317
|
+
filterOption: isFunction(_onSearch) ? false : function (input, option) {
|
|
318
|
+
var _option$children, _option$children$prop;
|
|
319
|
+
var value = isString(option === null || option === void 0 ? void 0 : option.children) ? option === null || option === void 0 ? void 0 : option.children : option === null || option === void 0 ? void 0 : (_option$children = option.children) === null || _option$children === void 0 ? void 0 : (_option$children$prop = _option$children.props) === null || _option$children$prop === void 0 ? void 0 : _option$children$prop.title;
|
|
320
|
+
return value.toLowerCase().includes(input.toLowerCase());
|
|
321
|
+
},
|
|
322
|
+
onSearch: function onSearch(value) {
|
|
323
|
+
_onSearch && _onSearch(value, _objectSpread({}, fetchFunction));
|
|
324
|
+
},
|
|
325
|
+
getPopupContainer: function getPopupContainer(trigger) {
|
|
326
|
+
return scrollFollowParent ? trigger.parentElement : document.body;
|
|
327
|
+
}
|
|
328
|
+
}, omit(cloneDeep(selectProps), ['isView', 'showCodeName', 'form', 'name', 'style', 'className'])), {}, {
|
|
329
|
+
value: transformValue(),
|
|
330
|
+
children: Array.isArray(newSelectList) && newSelectList.map(function (item) {
|
|
331
|
+
return _jsx(Option, {
|
|
332
|
+
value: item[code],
|
|
333
|
+
record: item,
|
|
334
|
+
disabled: !!item.disabled,
|
|
335
|
+
children: _jsx(TooltipOption, {
|
|
336
|
+
title: OptionRender ? OptionRender(item) : selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label],
|
|
337
|
+
children: OptionRender ? _jsx("span", {
|
|
338
|
+
title: OptionRender(item),
|
|
339
|
+
children: OptionRender(item)
|
|
340
|
+
}) : _jsx("span", {
|
|
341
|
+
title: "".concat(item[code], "-").concat(item[label]),
|
|
342
|
+
children: selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label]
|
|
343
|
+
})
|
|
344
|
+
}, item[code])
|
|
345
|
+
}, item[code]);
|
|
346
|
+
})
|
|
347
|
+
}))
|
|
348
|
+
});
|
|
354
349
|
};
|
|
355
350
|
export default /*#__PURE__*/forwardRef(ProSelect);
|
package/es/ProSelect/index.less
CHANGED
|
@@ -23,7 +23,7 @@ var _components = require("./components");
|
|
|
23
23
|
var _ProForm = _interopRequireDefault(require("../ProForm"));
|
|
24
24
|
var _empty = _interopRequireDefault(require("../assets/empty.png"));
|
|
25
25
|
var _locale = _interopRequireWildcard(require("../locale"));
|
|
26
|
-
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey", "rowDisabled", "footerRender"];
|
|
26
|
+
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey", "rowDisabled", "footerRender", "scroll"];
|
|
27
27
|
var ProEditTable = function ProEditTable(_ref, ref) {
|
|
28
28
|
var _resetProps$id, _resetProps$id$split, _themeConfig$data2, _value$2;
|
|
29
29
|
var value = _ref.value,
|
|
@@ -54,6 +54,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
54
54
|
rowKey = _ref.rowKey,
|
|
55
55
|
rowDisabled = _ref.rowDisabled,
|
|
56
56
|
footerRender = _ref.footerRender,
|
|
57
|
+
scroll = _ref.scroll,
|
|
57
58
|
resetProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
58
59
|
// 上下文form
|
|
59
60
|
var contentForm = _antd.Form.useFormInstance();
|
|
@@ -349,7 +350,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
349
350
|
pageSize: page.pageSize,
|
|
350
351
|
showSizeChanger: false,
|
|
351
352
|
showQuickJumper: true,
|
|
352
|
-
total: value.length,
|
|
353
|
+
total: value === null || value === void 0 ? void 0 : value.length,
|
|
353
354
|
showTotal: function showTotal(total) {
|
|
354
355
|
var _locale$ProEditTable;
|
|
355
356
|
if (!total) return;
|
|
@@ -360,6 +361,10 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
360
361
|
onChange: handlePageChange
|
|
361
362
|
}, pagination) : false,
|
|
362
363
|
rowKey: "rowKey",
|
|
364
|
+
scroll: {
|
|
365
|
+
x: scroll === null || scroll === void 0 ? void 0 : scroll.x,
|
|
366
|
+
y: (value === null || value === void 0 ? void 0 : value.length) ? scroll === null || scroll === void 0 ? void 0 : scroll.y : undefined
|
|
367
|
+
},
|
|
363
368
|
summary: _summary
|
|
364
369
|
}))]
|
|
365
370
|
}), !isView && (value === null || value === void 0 ? void 0 : value.length) ? (0, _jsxRuntime.jsx)("div", {
|
|
@@ -703,7 +703,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
703
703
|
}, 2000),
|
|
704
704
|
style: {
|
|
705
705
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
|
706
|
-
}
|
|
706
|
+
},
|
|
707
|
+
className: "ant-select-compact-item"
|
|
707
708
|
}, (0, _lodash.omit)(restProps, ['otherProps']))) : (0, _jsxRuntime.jsx)(_antd.Input, (0, _objectSpread3.default)({
|
|
708
709
|
value: viewText,
|
|
709
710
|
onChange: handleChangeValue,
|
package/lib/ProSelect/index.js
CHANGED
|
@@ -64,12 +64,8 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
64
64
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
65
65
|
viewFlag = _useState2[0],
|
|
66
66
|
setViewFlag = _useState2[1];
|
|
67
|
-
var
|
|
68
|
-
|
|
69
|
-
inputEl = _useState4[0],
|
|
70
|
-
setInputEl = _useState4[1];
|
|
71
|
-
var refSelect1 = (0, _react.useRef)((Math.random() * 100).toFixed(0));
|
|
72
|
-
var _useInViewport = (0, _ahooks.useInViewport)(inputEl),
|
|
67
|
+
var refSelect1 = (0, _react.useRef)();
|
|
68
|
+
var _useInViewport = (0, _ahooks.useInViewport)(refSelect1),
|
|
73
69
|
_useInViewport2 = (0, _slicedToArray2.default)(_useInViewport, 1),
|
|
74
70
|
inViewport = _useInViewport2[0];
|
|
75
71
|
selectProps.showCodeName = (_selectProps$showCode = selectProps.showCodeName) !== null && _selectProps$showCode !== void 0 ? _selectProps$showCode : showCodeName;
|
|
@@ -82,15 +78,15 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
82
78
|
code = fieldNames.value;
|
|
83
79
|
label = fieldNames.label;
|
|
84
80
|
}
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
-
selectList =
|
|
88
|
-
setSelectList =
|
|
81
|
+
var _useState3 = (0, _react.useState)(dataSource || []),
|
|
82
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
83
|
+
selectList = _useState4[0],
|
|
84
|
+
setSelectList = _useState4[1];
|
|
89
85
|
// 用来控制只有第一次才会设置 defaultOne 属性、🔒
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
isDefaultOne =
|
|
93
|
-
setIsDefaultOne =
|
|
86
|
+
var _useState5 = (0, _react.useState)(false),
|
|
87
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
88
|
+
isDefaultOne = _useState6[0],
|
|
89
|
+
setIsDefaultOne = _useState6[1];
|
|
94
90
|
var OptionRender = optionRender;
|
|
95
91
|
var defaultOnSuccessFun = function defaultOnSuccessFun(res) {
|
|
96
92
|
var _res$status = res.status,
|
|
@@ -161,12 +157,6 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
161
157
|
setViewFlag(true);
|
|
162
158
|
}
|
|
163
159
|
}, [inViewport]);
|
|
164
|
-
(0, _react.useEffect)(function () {
|
|
165
|
-
var el = document.getElementById(refSelect1 === null || refSelect1 === void 0 ? void 0 : refSelect1.current);
|
|
166
|
-
if (el) {
|
|
167
|
-
setInputEl(el);
|
|
168
|
-
}
|
|
169
|
-
}, []);
|
|
170
160
|
// disable默认值
|
|
171
161
|
if (defaultDisableValue) {
|
|
172
162
|
return (0, _jsxRuntime.jsx)("span", {
|
|
@@ -311,46 +301,53 @@ var ProSelect = exports.ProSelect = function ProSelect(props, ref) {
|
|
|
311
301
|
fieldNames: fieldNames
|
|
312
302
|
});
|
|
313
303
|
}
|
|
314
|
-
return (0, _jsxRuntime.jsx)(
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
304
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
305
|
+
ref: refSelect1,
|
|
306
|
+
style: props.style,
|
|
307
|
+
className: props.className,
|
|
308
|
+
children: (0, _jsxRuntime.jsx)(_antd.Select
|
|
309
|
+
// id={refSelect1.current}
|
|
310
|
+
, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
311
|
+
// id={refSelect1.current}
|
|
312
|
+
placeholder: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProSelect = _locale.default.ProSelect) === null || _locale$ProSelect === void 0 ? void 0 : _locale$ProSelect.select,
|
|
313
|
+
allowClear: true,
|
|
314
|
+
showArrow: true,
|
|
315
|
+
loading: fetchFunction === null || fetchFunction === void 0 ? void 0 : fetchFunction.loading,
|
|
316
|
+
onChange: handleChange,
|
|
317
|
+
optionLabelProp: "children" // 解决warning报错,添加默认值
|
|
318
|
+
,
|
|
319
|
+
showSearch: true,
|
|
320
|
+
filterOption: (0, _lodash.isFunction)(_onSearch) ? false : function (input, option) {
|
|
321
|
+
var _option$children, _option$children$prop;
|
|
322
|
+
var value = (0, _lodash.isString)(option === null || option === void 0 ? void 0 : option.children) ? option === null || option === void 0 ? void 0 : option.children : option === null || option === void 0 ? void 0 : (_option$children = option.children) === null || _option$children === void 0 ? void 0 : (_option$children$prop = _option$children.props) === null || _option$children$prop === void 0 ? void 0 : _option$children$prop.title;
|
|
323
|
+
return value.toLowerCase().includes(input.toLowerCase());
|
|
324
|
+
},
|
|
325
|
+
onSearch: function onSearch(value) {
|
|
326
|
+
_onSearch && _onSearch(value, (0, _objectSpread2.default)({}, fetchFunction));
|
|
327
|
+
},
|
|
328
|
+
getPopupContainer: function getPopupContainer(trigger) {
|
|
329
|
+
return scrollFollowParent ? trigger.parentElement : document.body;
|
|
330
|
+
}
|
|
331
|
+
}, (0, _lodash.omit)((0, _lodash.cloneDeep)(selectProps), ['isView', 'showCodeName', 'form', 'name', 'style', 'className'])), {}, {
|
|
332
|
+
value: transformValue(),
|
|
333
|
+
children: Array.isArray(newSelectList) && newSelectList.map(function (item) {
|
|
334
|
+
return (0, _jsxRuntime.jsx)(Option, {
|
|
335
|
+
value: item[code],
|
|
336
|
+
record: item,
|
|
337
|
+
disabled: !!item.disabled,
|
|
338
|
+
children: (0, _jsxRuntime.jsx)(TooltipOption, {
|
|
339
|
+
title: OptionRender ? OptionRender(item) : selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label],
|
|
340
|
+
children: OptionRender ? (0, _jsxRuntime.jsx)("span", {
|
|
341
|
+
title: OptionRender(item),
|
|
342
|
+
children: OptionRender(item)
|
|
343
|
+
}) : (0, _jsxRuntime.jsx)("span", {
|
|
344
|
+
title: "".concat(item[code], "-").concat(item[label]),
|
|
345
|
+
children: selectProps.showCodeName ? "".concat(item[code], "-").concat(item[label]) : item[label]
|
|
346
|
+
})
|
|
347
|
+
}, item[code])
|
|
348
|
+
}, item[code]);
|
|
349
|
+
})
|
|
350
|
+
}))
|
|
351
|
+
});
|
|
355
352
|
};
|
|
356
353
|
var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(ProSelect);
|
package/lib/ProSelect/index.less
CHANGED