ztxkui 2.1.6 → 2.2.0
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.
|
@@ -144,7 +144,9 @@ function EnhanceSelect(_a) {
|
|
|
144
144
|
getData(request, {
|
|
145
145
|
url: url,
|
|
146
146
|
method: method,
|
|
147
|
-
params: __assign(__assign({ size:
|
|
147
|
+
params: __assign(__assign({ size: Array.isArray(dataKeyValue) && dataKeyValue.length > 30
|
|
148
|
+
? dataKeyValue.length
|
|
149
|
+
: 30, page: 1 }, outParams), searchParams),
|
|
148
150
|
})
|
|
149
151
|
.then(function (resData) {
|
|
150
152
|
var _a, _b, _c;
|
|
@@ -274,7 +276,7 @@ function EnhanceSelect(_a) {
|
|
|
274
276
|
}
|
|
275
277
|
else {
|
|
276
278
|
if (typeof restProps.value === 'string' ||
|
|
277
|
-
Array.isArray(restProps.value)) {
|
|
279
|
+
(Array.isArray(restProps.value) && restProps.value.length > 0)) {
|
|
278
280
|
// console.log('第二次请求数据,默认为需要根据主键去请求', restProps.value);
|
|
279
281
|
setFirstLoading(true);
|
|
280
282
|
getRemoteDataHandle('', restProps.value);
|
|
@@ -342,6 +344,7 @@ function EnhanceSelect(_a) {
|
|
|
342
344
|
};
|
|
343
345
|
// onChange 方法
|
|
344
346
|
var onChangeHandle = function (value, option) {
|
|
347
|
+
setFirstLoading(true);
|
|
345
348
|
if (((Array.isArray(value) && value.length === 0) || !value) &&
|
|
346
349
|
remoteSearch &&
|
|
347
350
|
!firstClearData) {
|
|
@@ -118,9 +118,10 @@ function Table(props) {
|
|
|
118
118
|
* @description 动态列配置重置功能
|
|
119
119
|
*/
|
|
120
120
|
var resetDynamicHandle = useCallback(function () {
|
|
121
|
-
|
|
121
|
+
var _initColumns = initColumns || columns;
|
|
122
|
+
setColumns(_initColumns);
|
|
122
123
|
onDynamicChange &&
|
|
123
|
-
onDynamicChange((
|
|
124
|
+
onDynamicChange((_initColumns || []).map(function (item) {
|
|
124
125
|
if (item.dataIndex || item.key) {
|
|
125
126
|
return {
|
|
126
127
|
dataIndex: item.dataIndex,
|
|
@@ -131,7 +132,7 @@ function Table(props) {
|
|
|
131
132
|
return __assign({}, item);
|
|
132
133
|
}));
|
|
133
134
|
hideDynamicHandle();
|
|
134
|
-
}, [initColumns, hideDynamicHandle, onDynamicChange]);
|
|
135
|
+
}, [initColumns, columns, hideDynamicHandle, onDynamicChange]);
|
|
135
136
|
/**
|
|
136
137
|
* @description 切换行位置
|
|
137
138
|
*/
|