@bit-sun/business-component 3.2.0-alpha.5 → 3.2.2
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
|
@@ -4578,9 +4578,9 @@ var SearchSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
4578
4578
|
if (labelInValue) {
|
|
4579
4579
|
var formatResult = value.map(function (i) {
|
|
4580
4580
|
return {
|
|
4581
|
-
key: i[mappingValueField],
|
|
4582
|
-
label: i[mappingTextField],
|
|
4583
|
-
value: i[mappingValueField]
|
|
4581
|
+
key: i[mappingValueField] || i.key,
|
|
4582
|
+
label: i[mappingTextField] || i.label,
|
|
4583
|
+
value: i[mappingValueField] || i.value
|
|
4584
4584
|
};
|
|
4585
4585
|
});
|
|
4586
4586
|
onChange(selectMode ? formatResult : formatResult[0], value, source);
|
|
@@ -15719,7 +15719,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
15719
15719
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
15720
15720
|
showExportColumn = _useState10[0],
|
|
15721
15721
|
setShowExportColumns = _useState10[1]; // 导出列字段
|
|
15722
|
-
var _useState11 = useState(''),
|
|
15722
|
+
var _useState11 = useState('100vh'),
|
|
15723
15723
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
15724
15724
|
height = _useState12[0],
|
|
15725
15725
|
setHeight = _useState12[1];
|
|
@@ -15839,7 +15839,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
15839
15839
|
};
|
|
15840
15840
|
//组件初始挂载
|
|
15841
15841
|
useEffect(function () {
|
|
15842
|
-
getTableHeight();
|
|
15842
|
+
// getTableHeight();
|
|
15843
15843
|
setInitialTableInfo();
|
|
15844
15844
|
setInitialSearchFieldsInfo();
|
|
15845
15845
|
window.addEventListener('resize', function (e) {
|
|
@@ -34934,6 +34934,21 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
34934
34934
|
}) : pCode;
|
|
34935
34935
|
}
|
|
34936
34936
|
}
|
|
34937
|
+
if ((configItem === null || configItem === void 0 ? void 0 : configItem.inputType) === 30) {
|
|
34938
|
+
var _pCode$split;
|
|
34939
|
+
var _newPCode = Array.isArray(pCode) ? pCode === null || pCode === void 0 ? void 0 : pCode.map(function (s) {
|
|
34940
|
+
return isObj(s) ? s : {
|
|
34941
|
+
key: s,
|
|
34942
|
+
value: s
|
|
34943
|
+
};
|
|
34944
|
+
}) : pCode === null || pCode === void 0 ? void 0 : (_pCode$split = pCode.split(',')) === null || _pCode$split === void 0 ? void 0 : _pCode$split.map(function (s) {
|
|
34945
|
+
return {
|
|
34946
|
+
key: s,
|
|
34947
|
+
value: s
|
|
34948
|
+
};
|
|
34949
|
+
});
|
|
34950
|
+
return _newPCode || pCode || defaultValue;
|
|
34951
|
+
}
|
|
34937
34952
|
return pCode || defaultValue;
|
|
34938
34953
|
};
|
|
34939
34954
|
var handleEdit = function handleEdit(code, val, functionItem) {
|
|
@@ -34944,7 +34959,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
34944
34959
|
});
|
|
34945
34960
|
return;
|
|
34946
34961
|
}
|
|
34947
|
-
if (Array.isArray(val)) {
|
|
34962
|
+
if (Array.isArray(val) && (val === null || val === void 0 ? void 0 : val.length)) {
|
|
34948
34963
|
value = val.map(function (m) {
|
|
34949
34964
|
return m.value || m;
|
|
34950
34965
|
}).join(',');
|
package/dist/index.js
CHANGED
|
@@ -4601,9 +4601,9 @@ var SearchSelect = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
4601
4601
|
if (labelInValue) {
|
|
4602
4602
|
var formatResult = value.map(function (i) {
|
|
4603
4603
|
return {
|
|
4604
|
-
key: i[mappingValueField],
|
|
4605
|
-
label: i[mappingTextField],
|
|
4606
|
-
value: i[mappingValueField]
|
|
4604
|
+
key: i[mappingValueField] || i.key,
|
|
4605
|
+
label: i[mappingTextField] || i.label,
|
|
4606
|
+
value: i[mappingValueField] || i.value
|
|
4607
4607
|
};
|
|
4608
4608
|
});
|
|
4609
4609
|
onChange(selectMode ? formatResult : formatResult[0], value, source);
|
|
@@ -15742,7 +15742,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
15742
15742
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
15743
15743
|
showExportColumn = _useState10[0],
|
|
15744
15744
|
setShowExportColumns = _useState10[1]; // 导出列字段
|
|
15745
|
-
var _useState11 = React$1.useState(''),
|
|
15745
|
+
var _useState11 = React$1.useState('100vh'),
|
|
15746
15746
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
15747
15747
|
height = _useState12[0],
|
|
15748
15748
|
setHeight = _useState12[1];
|
|
@@ -15862,7 +15862,7 @@ var BsSulaQueryTable = (function (props) {
|
|
|
15862
15862
|
};
|
|
15863
15863
|
//组件初始挂载
|
|
15864
15864
|
React$1.useEffect(function () {
|
|
15865
|
-
getTableHeight();
|
|
15865
|
+
// getTableHeight();
|
|
15866
15866
|
setInitialTableInfo();
|
|
15867
15867
|
setInitialSearchFieldsInfo();
|
|
15868
15868
|
window.addEventListener('resize', function (e) {
|
|
@@ -34957,6 +34957,21 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
34957
34957
|
}) : pCode;
|
|
34958
34958
|
}
|
|
34959
34959
|
}
|
|
34960
|
+
if ((configItem === null || configItem === void 0 ? void 0 : configItem.inputType) === 30) {
|
|
34961
|
+
var _pCode$split;
|
|
34962
|
+
var _newPCode = Array.isArray(pCode) ? pCode === null || pCode === void 0 ? void 0 : pCode.map(function (s) {
|
|
34963
|
+
return isObj(s) ? s : {
|
|
34964
|
+
key: s,
|
|
34965
|
+
value: s
|
|
34966
|
+
};
|
|
34967
|
+
}) : pCode === null || pCode === void 0 ? void 0 : (_pCode$split = pCode.split(',')) === null || _pCode$split === void 0 ? void 0 : _pCode$split.map(function (s) {
|
|
34968
|
+
return {
|
|
34969
|
+
key: s,
|
|
34970
|
+
value: s
|
|
34971
|
+
};
|
|
34972
|
+
});
|
|
34973
|
+
return _newPCode || pCode || defaultValue;
|
|
34974
|
+
}
|
|
34960
34975
|
return pCode || defaultValue;
|
|
34961
34976
|
};
|
|
34962
34977
|
var handleEdit = function handleEdit(code, val, functionItem) {
|
|
@@ -34967,7 +34982,7 @@ var RuleObjectComponent = /*#__PURE__*/function (_Component) {
|
|
|
34967
34982
|
});
|
|
34968
34983
|
return;
|
|
34969
34984
|
}
|
|
34970
|
-
if (Array.isArray(val)) {
|
|
34985
|
+
if (Array.isArray(val) && (val === null || val === void 0 ? void 0 : val.length)) {
|
|
34971
34986
|
value = val.map(function (m) {
|
|
34972
34987
|
return m.value || m;
|
|
34973
34988
|
}).join(',');
|
package/package.json
CHANGED
|
@@ -159,7 +159,7 @@ const getSettingFieldOrColumn = (savedConfig, originConfig, type: string) => {
|
|
|
159
159
|
const [showSearchFields, setShowSearchFields] = useState(originSearchFields); //搜索项字段
|
|
160
160
|
const [showExportColumn, setShowExportColumns] = useState([]); // 导出列字段
|
|
161
161
|
|
|
162
|
-
const [height, setHeight]: any = useState('');
|
|
162
|
+
const [height, setHeight]: any = useState('100vh');
|
|
163
163
|
const sortTableRef = useRef(null);
|
|
164
164
|
const searchTableRef = useRef(null);
|
|
165
165
|
const exportTableRef = useRef<any>(null);
|
|
@@ -312,7 +312,7 @@ const getSettingFieldOrColumn = (savedConfig, originConfig, type: string) => {
|
|
|
312
312
|
|
|
313
313
|
//组件初始挂载
|
|
314
314
|
useEffect(() => {
|
|
315
|
-
getTableHeight();
|
|
315
|
+
// getTableHeight();
|
|
316
316
|
setInitialTableInfo();
|
|
317
317
|
setInitialSearchFieldsInfo();
|
|
318
318
|
window.addEventListener('resize', (e) => {
|
|
@@ -478,7 +478,7 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
478
478
|
|
|
479
479
|
const formaData = (value: any, source: any) => {
|
|
480
480
|
if (labelInValue) {
|
|
481
|
-
const formatResult = value.map((i: any) => ({ key: i[mappingValueField], label: i[mappingTextField], value: i[mappingValueField] }))
|
|
481
|
+
const formatResult = value.map((i: any) => ({ key: i[mappingValueField] || i.key, label: i[mappingTextField] || i.label, value: i[mappingValueField] || i.value }))
|
|
482
482
|
onChange(selectMode ? formatResult : formatResult[0], value,source)
|
|
483
483
|
} else {
|
|
484
484
|
const formatResult = selectMode ? value.map((i: any) => i.value) : _.get(value[0], 'value')
|
|
@@ -1021,6 +1021,10 @@ class RuleObjectComponent extends Component {
|
|
|
1021
1021
|
return pCode ? newPCode?.map((i) => moment(i)) : pCode;
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
|
+
if(configItem?.inputType === 30) {
|
|
1025
|
+
const newPCode = Array.isArray(pCode) ? pCode?.map(s => isObj(s) ? s : ({ key: s, value: s })) : pCode?.split(',')?.map(s => ({ key: s, value: s }));
|
|
1026
|
+
return newPCode || pCode || defaultValue;
|
|
1027
|
+
}
|
|
1024
1028
|
return pCode || defaultValue;
|
|
1025
1029
|
};
|
|
1026
1030
|
const handleEdit = (code, val, functionItem) => {
|
|
@@ -1031,7 +1035,7 @@ class RuleObjectComponent extends Component {
|
|
|
1031
1035
|
});
|
|
1032
1036
|
return;
|
|
1033
1037
|
}
|
|
1034
|
-
if (Array.isArray(val)) {
|
|
1038
|
+
if (Array.isArray(val) && val?.length) {
|
|
1035
1039
|
value = val.map((m) => m.value || m).join(',');
|
|
1036
1040
|
}
|
|
1037
1041
|
if (isObj(val)) {
|