@bit-sun/business-component 3.0.1-alpha.1 → 3.0.1-alpha.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/dist/index.esm.js
CHANGED
|
@@ -3713,6 +3713,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
3713
3713
|
labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
|
|
3714
3714
|
requestConfig = props.requestConfig,
|
|
3715
3715
|
ctx = props.ctx,
|
|
3716
|
+
_props$onlyShowStr = props.onlyShowStr,
|
|
3717
|
+
onlyShowStr = _props$onlyShowStr === void 0 ? false : _props$onlyShowStr,
|
|
3716
3718
|
sourceName = props.sourceName,
|
|
3717
3719
|
_props$needModalTable = props.needModalTable,
|
|
3718
3720
|
needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
|
|
@@ -4552,6 +4554,12 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
4552
4554
|
return specialBracket ? "\u3010".concat(item.textShowKey, "\u3011").concat(showText) : "".concat(item.textShowKey, " ").concat(showText);
|
|
4553
4555
|
}
|
|
4554
4556
|
};
|
|
4557
|
+
var getShowStr = function getShowStr() {
|
|
4558
|
+
var _filter, _filter$;
|
|
4559
|
+
return ((_filter = (items || []).filter(function (item) {
|
|
4560
|
+
return item.value === value;
|
|
4561
|
+
})) === null || _filter === void 0 ? void 0 : (_filter$ = _filter[0]) === null || _filter$ === void 0 ? void 0 : _filter$.text) || value || '';
|
|
4562
|
+
};
|
|
4555
4563
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
4556
4564
|
className: 'search_select'
|
|
4557
4565
|
}, fieldComponent ? ( /*#__PURE__*/React$1.createElement("div", {
|
|
@@ -4560,7 +4568,14 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
4560
4568
|
(_fieldComponent$props = fieldComponent.props) === null || _fieldComponent$props === void 0 ? void 0 : (_fieldComponent$props2 = _fieldComponent$props.onClick) === null || _fieldComponent$props2 === void 0 ? void 0 : _fieldComponent$props2.call(_fieldComponent$props);
|
|
4561
4569
|
showModal();
|
|
4562
4570
|
}
|
|
4563
|
-
}, fieldComponent)) : ( /*#__PURE__*/React$1.createElement("div", {
|
|
4571
|
+
}, fieldComponent)) : onlyShowStr ? ( /*#__PURE__*/React$1.createElement("div", {
|
|
4572
|
+
style: {
|
|
4573
|
+
overflow: 'hidden',
|
|
4574
|
+
textOverflow: 'ellipsis',
|
|
4575
|
+
whiteSpace: 'nowrap'
|
|
4576
|
+
},
|
|
4577
|
+
className: 'search_select_show'
|
|
4578
|
+
}, getShowStr())) : /*#__PURE__*/React$1.createElement("div", {
|
|
4564
4579
|
className: "search_select_show",
|
|
4565
4580
|
id: "search_select_div_".concat(uniqueValue)
|
|
4566
4581
|
}, /*#__PURE__*/React$1.createElement(Select, _objectSpread2(_objectSpread2({
|
|
@@ -4633,7 +4648,7 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
4633
4648
|
},
|
|
4634
4649
|
onClick: showModal,
|
|
4635
4650
|
type: "primary"
|
|
4636
|
-
}, /*#__PURE__*/React$1.createElement(SearchOutlined, null))))
|
|
4651
|
+
}, /*#__PURE__*/React$1.createElement(SearchOutlined, null)))), needModalTable && isModalVisible && ( /*#__PURE__*/React$1.createElement(Modal, _objectSpread2({
|
|
4637
4652
|
width: "80%",
|
|
4638
4653
|
title: modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.modalTableTitle,
|
|
4639
4654
|
visible: isModalVisible,
|
package/dist/index.js
CHANGED
|
@@ -3735,6 +3735,8 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
3735
3735
|
labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
|
|
3736
3736
|
requestConfig = props.requestConfig,
|
|
3737
3737
|
ctx = props.ctx,
|
|
3738
|
+
_props$onlyShowStr = props.onlyShowStr,
|
|
3739
|
+
onlyShowStr = _props$onlyShowStr === void 0 ? false : _props$onlyShowStr,
|
|
3738
3740
|
sourceName = props.sourceName,
|
|
3739
3741
|
_props$needModalTable = props.needModalTable,
|
|
3740
3742
|
needModalTable = _props$needModalTable === void 0 ? true : _props$needModalTable,
|
|
@@ -4574,6 +4576,12 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
4574
4576
|
return specialBracket ? "\u3010".concat(item.textShowKey, "\u3011").concat(showText) : "".concat(item.textShowKey, " ").concat(showText);
|
|
4575
4577
|
}
|
|
4576
4578
|
};
|
|
4579
|
+
var getShowStr = function getShowStr() {
|
|
4580
|
+
var _filter, _filter$;
|
|
4581
|
+
return ((_filter = (items || []).filter(function (item) {
|
|
4582
|
+
return item.value === value;
|
|
4583
|
+
})) === null || _filter === void 0 ? void 0 : (_filter$ = _filter[0]) === null || _filter$ === void 0 ? void 0 : _filter$.text) || value || '';
|
|
4584
|
+
};
|
|
4577
4585
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4578
4586
|
className: 'search_select'
|
|
4579
4587
|
}, fieldComponent ? ( /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -4582,7 +4590,14 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
4582
4590
|
(_fieldComponent$props = fieldComponent.props) === null || _fieldComponent$props === void 0 ? void 0 : (_fieldComponent$props2 = _fieldComponent$props.onClick) === null || _fieldComponent$props2 === void 0 ? void 0 : _fieldComponent$props2.call(_fieldComponent$props);
|
|
4583
4591
|
showModal();
|
|
4584
4592
|
}
|
|
4585
|
-
}, fieldComponent)) : ( /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4593
|
+
}, fieldComponent)) : onlyShowStr ? ( /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4594
|
+
style: {
|
|
4595
|
+
overflow: 'hidden',
|
|
4596
|
+
textOverflow: 'ellipsis',
|
|
4597
|
+
whiteSpace: 'nowrap'
|
|
4598
|
+
},
|
|
4599
|
+
className: 'search_select_show'
|
|
4600
|
+
}, getShowStr())) : /*#__PURE__*/React__default['default'].createElement("div", {
|
|
4586
4601
|
className: "search_select_show",
|
|
4587
4602
|
id: "search_select_div_".concat(uniqueValue)
|
|
4588
4603
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
|
|
@@ -4655,7 +4670,7 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
4655
4670
|
},
|
|
4656
4671
|
onClick: showModal,
|
|
4657
4672
|
type: "primary"
|
|
4658
|
-
}, /*#__PURE__*/React__default['default'].createElement(icons.SearchOutlined, null))))
|
|
4673
|
+
}, /*#__PURE__*/React__default['default'].createElement(icons.SearchOutlined, null)))), needModalTable && isModalVisible && ( /*#__PURE__*/React__default['default'].createElement(antd.Modal, _objectSpread2({
|
|
4659
4674
|
width: "80%",
|
|
4660
4675
|
title: modalTableProps === null || modalTableProps === void 0 ? void 0 : modalTableProps.modalTableTitle,
|
|
4661
4676
|
visible: isModalVisible,
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
22
22
|
labelInValue = false,
|
|
23
23
|
requestConfig,
|
|
24
24
|
ctx,
|
|
25
|
+
onlyShowStr = false,
|
|
25
26
|
sourceName,
|
|
26
27
|
needModalTable = true,
|
|
27
28
|
getPopupContainer = undefined,
|
|
@@ -775,6 +776,10 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
775
776
|
}
|
|
776
777
|
};
|
|
777
778
|
|
|
779
|
+
const getShowStr = () => {
|
|
780
|
+
return (items || []).filter(item => item.value === value)?.[0]?.text || value || '';
|
|
781
|
+
}
|
|
782
|
+
|
|
778
783
|
return (
|
|
779
784
|
<div className={'search_select'}>
|
|
780
785
|
{fieldComponent ? (
|
|
@@ -787,6 +792,10 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
787
792
|
{fieldComponent}
|
|
788
793
|
</div>
|
|
789
794
|
) : (
|
|
795
|
+
onlyShowStr ?
|
|
796
|
+
(<div style={{overflow:'hidden',textOverflow:'ellipsis',whiteSpace:'nowrap'}} className={'search_select_show'}>
|
|
797
|
+
{getShowStr()}
|
|
798
|
+
</div>) :
|
|
790
799
|
<div
|
|
791
800
|
className="search_select_show"
|
|
792
801
|
id={`search_select_div_${uniqueValue}`}
|