ls-pro-common 3.0.98 → 3.0.99
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/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/components/InputTable.js +12 -6
- package/es/utils/modal.js +1 -1
- package/lib/components/InputTable.js +12 -6
- package/lib/utils/modal.js +1 -1
- package/package.json +1 -1
|
@@ -245,6 +245,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
245
245
|
}();
|
|
246
246
|
var initName = function initName(val) {
|
|
247
247
|
var _columns$find;
|
|
248
|
+
var updateTxt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
248
249
|
if (!val) return;
|
|
249
250
|
var fieldName = ((_columns$find = columns.find(function (o) {
|
|
250
251
|
return o.dataIndex === valueField;
|
|
@@ -263,6 +264,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
263
264
|
param[fieldName] = val;
|
|
264
265
|
loadData(param).then(function (result) {
|
|
265
266
|
initRows.current = result.data;
|
|
267
|
+
if (!updateTxt) return;
|
|
266
268
|
var rows = (result.data || []).filter(function (o) {
|
|
267
269
|
return o;
|
|
268
270
|
});
|
|
@@ -284,12 +286,16 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
284
286
|
var txt = (_formValue$textNamePr = formValue === null || formValue === void 0 ? void 0 : formValue[textNameProp]) !== null && _formValue$textNamePr !== void 0 ? _formValue$textNamePr : record === null || record === void 0 ? void 0 : record[textNameProp];
|
|
285
287
|
var val = (_formValue$name = formValue === null || formValue === void 0 ? void 0 : formValue[name]) !== null && _formValue$name !== void 0 ? _formValue$name : record === null || record === void 0 ? void 0 : record[name];
|
|
286
288
|
setText(txt !== null && txt !== void 0 ? txt : val);
|
|
287
|
-
if (val
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
289
|
+
if (val) {
|
|
290
|
+
if (!txt) {
|
|
291
|
+
formValue[textNameProp] = val;
|
|
292
|
+
setFormValue(formValue);
|
|
293
|
+
// 多值选择或选择的初始值不在第一页时显示有问题
|
|
294
|
+
if (textField !== valueField) {
|
|
295
|
+
initName(val);
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
initName(val, false);
|
|
293
299
|
}
|
|
294
300
|
}
|
|
295
301
|
}, [rowKey]);
|
package/es/utils/modal.js
CHANGED
|
@@ -198,7 +198,7 @@ export var reLogin = function reLogin() {
|
|
|
198
198
|
getContainer: getFullScreenElement() || document.body,
|
|
199
199
|
afterClose: function afterClose() {
|
|
200
200
|
timeout = false;
|
|
201
|
-
(window.top || window).location.href = location.pathname === '/' ? '/login' : '/login
|
|
201
|
+
(window.top || window).location.href = location.pathname === '/' ? '/login/' : '/login/?redirect=' + encodeURIComponent(location.href);
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
204
|
};
|
|
@@ -245,6 +245,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
245
245
|
}();
|
|
246
246
|
var initName = function initName(val) {
|
|
247
247
|
var _columns$find;
|
|
248
|
+
var updateTxt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
248
249
|
if (!val) return;
|
|
249
250
|
var fieldName = ((_columns$find = columns.find(function (o) {
|
|
250
251
|
return o.dataIndex === valueField;
|
|
@@ -263,6 +264,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
263
264
|
param[fieldName] = val;
|
|
264
265
|
loadData(param).then(function (result) {
|
|
265
266
|
initRows.current = result.data;
|
|
267
|
+
if (!updateTxt) return;
|
|
266
268
|
var rows = (result.data || []).filter(function (o) {
|
|
267
269
|
return o;
|
|
268
270
|
});
|
|
@@ -284,12 +286,16 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
284
286
|
var txt = (_formValue$textNamePr = formValue === null || formValue === void 0 ? void 0 : formValue[textNameProp]) !== null && _formValue$textNamePr !== void 0 ? _formValue$textNamePr : record === null || record === void 0 ? void 0 : record[textNameProp];
|
|
285
287
|
var val = (_formValue$name = formValue === null || formValue === void 0 ? void 0 : formValue[name]) !== null && _formValue$name !== void 0 ? _formValue$name : record === null || record === void 0 ? void 0 : record[name];
|
|
286
288
|
setText(txt !== null && txt !== void 0 ? txt : val);
|
|
287
|
-
if (val
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
289
|
+
if (val) {
|
|
290
|
+
if (!txt) {
|
|
291
|
+
formValue[textNameProp] = val;
|
|
292
|
+
setFormValue(formValue);
|
|
293
|
+
// 多值选择或选择的初始值不在第一页时显示有问题
|
|
294
|
+
if (textField !== valueField) {
|
|
295
|
+
initName(val);
|
|
296
|
+
}
|
|
297
|
+
} else {
|
|
298
|
+
initName(val, false);
|
|
293
299
|
}
|
|
294
300
|
}
|
|
295
301
|
}, [rowKey]);
|
package/lib/utils/modal.js
CHANGED
|
@@ -198,7 +198,7 @@ export var reLogin = function reLogin() {
|
|
|
198
198
|
getContainer: getFullScreenElement() || document.body,
|
|
199
199
|
afterClose: function afterClose() {
|
|
200
200
|
timeout = false;
|
|
201
|
-
(window.top || window).location.href = location.pathname === '/' ? '/login' : '/login
|
|
201
|
+
(window.top || window).location.href = location.pathname === '/' ? '/login/' : '/login/?redirect=' + encodeURIComponent(location.href);
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
204
|
};
|