@bit-sun/business-component 4.0.13-alpha.24 → 4.0.13-alpha.26
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
|
@@ -5609,7 +5609,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5609
5609
|
currentPage: currentPage
|
|
5610
5610
|
}, otherParams), fixedParam), params);
|
|
5611
5611
|
if (isNil(queryParams[selectParamsKey]) && (searchValue === null || searchValue === void 0 ? void 0 : searchValue.length)) {
|
|
5612
|
-
|
|
5612
|
+
var _searchValue$trim;
|
|
5613
|
+
queryParams[selectParamsKey] = searchValue === null || searchValue === void 0 ? void 0 : (_searchValue$trim = searchValue.trim) === null || _searchValue$trim === void 0 ? void 0 : _searchValue$trim.call(searchValue);
|
|
5613
5614
|
}
|
|
5614
5615
|
var getRequest;
|
|
5615
5616
|
var methodName = method === null || method === void 0 ? void 0 : (_method$toLocaleLower = method.toLocaleLowerCase) === null || _method$toLocaleLower === void 0 ? void 0 : _method$toLocaleLower.call(method);
|
|
@@ -5874,7 +5875,8 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
5874
5875
|
}
|
|
5875
5876
|
};
|
|
5876
5877
|
var onSearchChange = function onSearchChange(v) {
|
|
5877
|
-
|
|
5878
|
+
var _v$trim;
|
|
5879
|
+
setSearchValue((v === null || v === void 0 ? void 0 : (_v$trim = v.trim) === null || _v$trim === void 0 ? void 0 : _v$trim.call(v)) || '');
|
|
5878
5880
|
if (!!searchStartLength && (v === null || v === void 0 ? void 0 : v.length) < searchStartLength) return;
|
|
5879
5881
|
refreshItems();
|
|
5880
5882
|
};
|
|
@@ -18395,7 +18397,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
18395
18397
|
};
|
|
18396
18398
|
// 处理 table 基本参数
|
|
18397
18399
|
var setTableProps = function setTableProps() {
|
|
18398
|
-
var _tableProps, _tableProps$initialPa, _tableProps2, _tableProps3,
|
|
18400
|
+
var _tableProps, _tableProps$initialPa, _tableProps2, _tableProps3, _tableProps4, _tableProps4$initialP;
|
|
18399
18401
|
var tableProps = value.tableProps || {};
|
|
18400
18402
|
tableProps = _objectSpread2(_objectSpread2({}, tableProps), {}, {
|
|
18401
18403
|
size: value.size || 'middle',
|
|
@@ -18418,16 +18420,16 @@ var BsSulaQueryTable = (function (props) {
|
|
|
18418
18420
|
x: props.overScrollX || 'max-content',
|
|
18419
18421
|
y: (props === null || props === void 0 ? void 0 : props.overScrollY) || height
|
|
18420
18422
|
},
|
|
18421
|
-
bordered: value.bordered
|
|
18422
|
-
sticky: true,
|
|
18423
|
-
rowClassName:
|
|
18423
|
+
bordered: typeof value.bordered == 'boolean' ? value.bordered : true,
|
|
18424
|
+
sticky: typeof value.sticky == 'boolean' ? value.sticky : true,
|
|
18425
|
+
rowClassName: (props === null || props === void 0 ? void 0 : props.rowClassName) || ((_tableProps2 = tableProps) === null || _tableProps2 === void 0 ? void 0 : _tableProps2.rowClassName) || function (record, index) {
|
|
18424
18426
|
return index % 2 === 0 ? 'table_base' : 'table_odd';
|
|
18425
18427
|
},
|
|
18426
18428
|
components: _objectSpread2({
|
|
18427
18429
|
header: {
|
|
18428
18430
|
cell: ResizeableTitle$2
|
|
18429
18431
|
}
|
|
18430
|
-
}, (
|
|
18432
|
+
}, (_tableProps3 = tableProps) === null || _tableProps3 === void 0 ? void 0 : _tableProps3.components)
|
|
18431
18433
|
}, props.viewPagePath ?
|
|
18432
18434
|
// 详情页查看地址 存在该参数时 默认列表支持双击打开
|
|
18433
18435
|
{
|
|
@@ -18442,7 +18444,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
18442
18444
|
}
|
|
18443
18445
|
} : {});
|
|
18444
18446
|
// @ts-ignore
|
|
18445
|
-
if ((
|
|
18447
|
+
if ((_tableProps4 = tableProps) === null || _tableProps4 === void 0 ? void 0 : (_tableProps4$initialP = _tableProps4.initialPaging) === null || _tableProps4$initialP === void 0 ? void 0 : _tableProps4$initialP.pagination) {
|
|
18446
18448
|
// @ts-ignore
|
|
18447
18449
|
tableProps.initialPaging.pagination.showSizeChanger = true;
|
|
18448
18450
|
}
|
|
@@ -37231,7 +37233,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
37231
37233
|
});
|
|
37232
37234
|
};
|
|
37233
37235
|
_this.renderRuleItem = function (itemDetail, parentDetail, floorIndex, classDataIndex, relateDatas) {
|
|
37234
|
-
var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2
|
|
37236
|
+
var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2;
|
|
37235
37237
|
var ruleTreeData = _this.state.ruleTreeData;
|
|
37236
37238
|
var _this$props3 = _this.props,
|
|
37237
37239
|
callBack = _this$props3.callBack,
|
|
@@ -37417,7 +37419,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
37417
37419
|
}, item.name);
|
|
37418
37420
|
}) : null), /*#__PURE__*/React$1.createElement(Input, {
|
|
37419
37421
|
disabled: disabled,
|
|
37420
|
-
value: (itemDetail === null || itemDetail === void 0 ? void 0 : (_itemDetail$params2 = itemDetail.params) === null || _itemDetail$params2 === void 0 ? void 0 :
|
|
37422
|
+
value: (itemDetail === null || itemDetail === void 0 ? void 0 : (_itemDetail$params2 = itemDetail.params) === null || _itemDetail$params2 === void 0 ? void 0 : _itemDetail$params2[0]) || '',
|
|
37421
37423
|
style: {
|
|
37422
37424
|
width: '150px',
|
|
37423
37425
|
marginLeft: '10px',
|
|
@@ -37427,7 +37429,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
37427
37429
|
var value = e.target.value;
|
|
37428
37430
|
var ruleClassData = _this.state.ruleClassData;
|
|
37429
37431
|
itemDetail.params = [value || ''];
|
|
37430
|
-
itemDetail.paramNames = [
|
|
37432
|
+
itemDetail.paramNames = [''];
|
|
37431
37433
|
_this.setState({
|
|
37432
37434
|
ruleClassData: ruleClassData
|
|
37433
37435
|
}, function () {
|
package/dist/index.js
CHANGED
|
@@ -5632,7 +5632,8 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5632
5632
|
currentPage: currentPage
|
|
5633
5633
|
}, otherParams), fixedParam), params);
|
|
5634
5634
|
if (_.isNil(queryParams[selectParamsKey]) && (searchValue === null || searchValue === void 0 ? void 0 : searchValue.length)) {
|
|
5635
|
-
|
|
5635
|
+
var _searchValue$trim;
|
|
5636
|
+
queryParams[selectParamsKey] = searchValue === null || searchValue === void 0 ? void 0 : (_searchValue$trim = searchValue.trim) === null || _searchValue$trim === void 0 ? void 0 : _searchValue$trim.call(searchValue);
|
|
5636
5637
|
}
|
|
5637
5638
|
var getRequest;
|
|
5638
5639
|
var methodName = method === null || method === void 0 ? void 0 : (_method$toLocaleLower = method.toLocaleLowerCase) === null || _method$toLocaleLower === void 0 ? void 0 : _method$toLocaleLower.call(method);
|
|
@@ -5897,7 +5898,8 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
5897
5898
|
}
|
|
5898
5899
|
};
|
|
5899
5900
|
var onSearchChange = function onSearchChange(v) {
|
|
5900
|
-
|
|
5901
|
+
var _v$trim;
|
|
5902
|
+
setSearchValue((v === null || v === void 0 ? void 0 : (_v$trim = v.trim) === null || _v$trim === void 0 ? void 0 : _v$trim.call(v)) || '');
|
|
5901
5903
|
if (!!searchStartLength && (v === null || v === void 0 ? void 0 : v.length) < searchStartLength) return;
|
|
5902
5904
|
refreshItems();
|
|
5903
5905
|
};
|
|
@@ -18418,7 +18420,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
18418
18420
|
};
|
|
18419
18421
|
// 处理 table 基本参数
|
|
18420
18422
|
var setTableProps = function setTableProps() {
|
|
18421
|
-
var _tableProps, _tableProps$initialPa, _tableProps2, _tableProps3,
|
|
18423
|
+
var _tableProps, _tableProps$initialPa, _tableProps2, _tableProps3, _tableProps4, _tableProps4$initialP;
|
|
18422
18424
|
var tableProps = value.tableProps || {};
|
|
18423
18425
|
tableProps = _objectSpread2(_objectSpread2({}, tableProps), {}, {
|
|
18424
18426
|
size: value.size || 'middle',
|
|
@@ -18441,16 +18443,16 @@ var BsSulaQueryTable = (function (props) {
|
|
|
18441
18443
|
x: props.overScrollX || 'max-content',
|
|
18442
18444
|
y: (props === null || props === void 0 ? void 0 : props.overScrollY) || height
|
|
18443
18445
|
},
|
|
18444
|
-
bordered: value.bordered
|
|
18445
|
-
sticky: true,
|
|
18446
|
-
rowClassName:
|
|
18446
|
+
bordered: typeof value.bordered == 'boolean' ? value.bordered : true,
|
|
18447
|
+
sticky: typeof value.sticky == 'boolean' ? value.sticky : true,
|
|
18448
|
+
rowClassName: (props === null || props === void 0 ? void 0 : props.rowClassName) || ((_tableProps2 = tableProps) === null || _tableProps2 === void 0 ? void 0 : _tableProps2.rowClassName) || function (record, index) {
|
|
18447
18449
|
return index % 2 === 0 ? 'table_base' : 'table_odd';
|
|
18448
18450
|
},
|
|
18449
18451
|
components: _objectSpread2({
|
|
18450
18452
|
header: {
|
|
18451
18453
|
cell: ResizeableTitle$2
|
|
18452
18454
|
}
|
|
18453
|
-
}, (
|
|
18455
|
+
}, (_tableProps3 = tableProps) === null || _tableProps3 === void 0 ? void 0 : _tableProps3.components)
|
|
18454
18456
|
}, props.viewPagePath ?
|
|
18455
18457
|
// 详情页查看地址 存在该参数时 默认列表支持双击打开
|
|
18456
18458
|
{
|
|
@@ -18465,7 +18467,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
18465
18467
|
}
|
|
18466
18468
|
} : {});
|
|
18467
18469
|
// @ts-ignore
|
|
18468
|
-
if ((
|
|
18470
|
+
if ((_tableProps4 = tableProps) === null || _tableProps4 === void 0 ? void 0 : (_tableProps4$initialP = _tableProps4.initialPaging) === null || _tableProps4$initialP === void 0 ? void 0 : _tableProps4$initialP.pagination) {
|
|
18469
18471
|
// @ts-ignore
|
|
18470
18472
|
tableProps.initialPaging.pagination.showSizeChanger = true;
|
|
18471
18473
|
}
|
|
@@ -37254,7 +37256,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
37254
37256
|
});
|
|
37255
37257
|
};
|
|
37256
37258
|
_this.renderRuleItem = function (itemDetail, parentDetail, floorIndex, classDataIndex, relateDatas) {
|
|
37257
|
-
var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2
|
|
37259
|
+
var _itemDetail$subExpres, _itemDetail$params, _itemDetail$params$, _itemDetail$params2;
|
|
37258
37260
|
var ruleTreeData = _this.state.ruleTreeData;
|
|
37259
37261
|
var _this$props3 = _this.props,
|
|
37260
37262
|
callBack = _this$props3.callBack,
|
|
@@ -37440,7 +37442,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
37440
37442
|
}, item.name);
|
|
37441
37443
|
}) : null), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
37442
37444
|
disabled: disabled,
|
|
37443
|
-
value: (itemDetail === null || itemDetail === void 0 ? void 0 : (_itemDetail$params2 = itemDetail.params) === null || _itemDetail$params2 === void 0 ? void 0 :
|
|
37445
|
+
value: (itemDetail === null || itemDetail === void 0 ? void 0 : (_itemDetail$params2 = itemDetail.params) === null || _itemDetail$params2 === void 0 ? void 0 : _itemDetail$params2[0]) || '',
|
|
37444
37446
|
style: {
|
|
37445
37447
|
width: '150px',
|
|
37446
37448
|
marginLeft: '10px',
|
|
@@ -37450,7 +37452,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
37450
37452
|
var value = e.target.value;
|
|
37451
37453
|
var ruleClassData = _this.state.ruleClassData;
|
|
37452
37454
|
itemDetail.params = [value || ''];
|
|
37453
|
-
itemDetail.paramNames = [
|
|
37455
|
+
itemDetail.paramNames = [''];
|
|
37454
37456
|
_this.setState({
|
|
37455
37457
|
ruleClassData: ruleClassData
|
|
37456
37458
|
}, function () {
|
package/package.json
CHANGED
|
@@ -552,10 +552,10 @@ export default (props: any) => {
|
|
|
552
552
|
x: props.overScrollX || 'max-content',
|
|
553
553
|
y: props?.overScrollY || height,
|
|
554
554
|
},
|
|
555
|
-
bordered: value.bordered
|
|
556
|
-
sticky: true,
|
|
557
|
-
rowClassName: (record: object | null | undefined, index: number) =>
|
|
558
|
-
index % 2 === 0 ? 'table_base' : 'table_odd',
|
|
555
|
+
bordered: typeof value.bordered == 'boolean' ? value.bordered : true,
|
|
556
|
+
sticky: typeof value.sticky == 'boolean' ? value.sticky : true,
|
|
557
|
+
rowClassName: props?.rowClassName || tableProps?.rowClassName || ((record: object | null | undefined, index: number) =>
|
|
558
|
+
index % 2 === 0 ? 'table_base' : 'table_odd'),
|
|
559
559
|
components: {
|
|
560
560
|
header: {
|
|
561
561
|
cell: ResizeableTitle,
|
|
@@ -232,7 +232,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
232
232
|
...params,
|
|
233
233
|
};
|
|
234
234
|
if (isNil(queryParams[selectParamsKey])&&searchValue?.length) {
|
|
235
|
-
queryParams[selectParamsKey] = searchValue;
|
|
235
|
+
queryParams[selectParamsKey] = searchValue?.trim?.();
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
let getRequest;
|
|
@@ -468,7 +468,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
const onSearchChange = (v) => {
|
|
471
|
-
setSearchValue(v);
|
|
471
|
+
setSearchValue(v?.trim?.()||'');
|
|
472
472
|
if(!!searchStartLength && v?.length < searchStartLength) return;
|
|
473
473
|
refreshItems();
|
|
474
474
|
}
|
|
@@ -932,7 +932,7 @@ class RuleObjectComponent extends Component {
|
|
|
932
932
|
</Select>
|
|
933
933
|
<Input
|
|
934
934
|
disabled={disabled}
|
|
935
|
-
value={itemDetail?.params?.[0]
|
|
935
|
+
value={itemDetail?.params?.[0]||''}
|
|
936
936
|
style={{
|
|
937
937
|
width: '150px',
|
|
938
938
|
marginLeft: '10px',
|
|
@@ -942,7 +942,7 @@ class RuleObjectComponent extends Component {
|
|
|
942
942
|
const value = e.target.value;
|
|
943
943
|
const { ruleClassData } = this.state;
|
|
944
944
|
itemDetail.params = [value || ''];
|
|
945
|
-
itemDetail.paramNames = [
|
|
945
|
+
itemDetail.paramNames = [''];
|
|
946
946
|
this.setState(
|
|
947
947
|
{
|
|
948
948
|
ruleClassData,
|