ls-pro-common 3.1.56 → 3.1.57
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 +6 -12
- package/lib/components/InputTable.js +6 -12
- package/package.json +1 -1
|
@@ -159,18 +159,18 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
159
159
|
* @param formValue
|
|
160
160
|
*/
|
|
161
161
|
var setFormValue = function setFormValue(formValue) {
|
|
162
|
-
var _prop$onChange;
|
|
163
|
-
(_prop$onChange = prop.onChange) === null || _prop$onChange === void 0 ? void 0 : _prop$onChange.call(prop, formValue[name]);
|
|
164
162
|
for (var key in formValue) {
|
|
165
163
|
if (formValue[key] === null) {
|
|
166
164
|
formValue[key] = undefined;
|
|
167
165
|
}
|
|
168
166
|
}
|
|
169
167
|
if (rowKey) {
|
|
170
|
-
var _formRef$current3, _formRef$current3$set;
|
|
168
|
+
var _formRef$current3, _formRef$current3$set, _prop$onChange;
|
|
171
169
|
formRef === null || formRef === void 0 ? void 0 : (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : (_formRef$current3$set = _formRef$current3.setFieldsValue) === null || _formRef$current3$set === void 0 ? void 0 : _formRef$current3$set.call(_formRef$current3, _defineProperty({}, rowKey, formValue));
|
|
170
|
+
(_prop$onChange = prop.onChange) === null || _prop$onChange === void 0 ? void 0 : _prop$onChange.call(prop, formValue[name]);
|
|
172
171
|
} else {
|
|
173
|
-
var _formRef$current4, _formRef$current4$set;
|
|
172
|
+
var _prop$onChange2, _formRef$current4, _formRef$current4$set;
|
|
173
|
+
(_prop$onChange2 = prop.onChange) === null || _prop$onChange2 === void 0 ? void 0 : _prop$onChange2.call(prop, formValue[name]);
|
|
174
174
|
formRef === null || formRef === void 0 ? void 0 : (_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 ? void 0 : (_formRef$current4$set = _formRef$current4.setFieldsValue) === null || _formRef$current4$set === void 0 ? void 0 : _formRef$current4$set.call(_formRef$current4, formValue);
|
|
175
175
|
}
|
|
176
176
|
};
|
|
@@ -495,12 +495,6 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
495
495
|
}
|
|
496
496
|
} catch (e) {}
|
|
497
497
|
}, [text, rest, fieldProps]);
|
|
498
|
-
// useEffect(() => {
|
|
499
|
-
// if (!prop.value) {
|
|
500
|
-
// handleClear();
|
|
501
|
-
// }
|
|
502
|
-
// console.log('value', prop.value);
|
|
503
|
-
// }, [prop.value]);
|
|
504
498
|
var tableDom = /*#__PURE__*/React.createElement(ProTable, _extends({
|
|
505
499
|
className: "ls-input-table",
|
|
506
500
|
columns: columns,
|
|
@@ -640,13 +634,13 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
640
634
|
name: [rowKey, textNameProp]
|
|
641
635
|
}, rest, {
|
|
642
636
|
noStyle: true
|
|
643
|
-
}), InputDom) :
|
|
637
|
+
}), InputDom) : (formRef === null || formRef === void 0 ? void 0 : formRef.current) ?
|
|
644
638
|
/*#__PURE__*/
|
|
645
639
|
// 在 ProTable 的查询面板中使用
|
|
646
640
|
React.createElement(_Form.Item, _extends({
|
|
647
641
|
name: textNameProp
|
|
648
642
|
}, rest, {
|
|
649
643
|
noStyle: true
|
|
650
|
-
}), InputDom));
|
|
644
|
+
}), InputDom) : /*#__PURE__*/React.createElement(React.Fragment, null, InputDom));
|
|
651
645
|
});
|
|
652
646
|
export default InputTable;
|
|
@@ -159,18 +159,18 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
159
159
|
* @param formValue
|
|
160
160
|
*/
|
|
161
161
|
var setFormValue = function setFormValue(formValue) {
|
|
162
|
-
var _prop$onChange;
|
|
163
|
-
(_prop$onChange = prop.onChange) === null || _prop$onChange === void 0 ? void 0 : _prop$onChange.call(prop, formValue[name]);
|
|
164
162
|
for (var key in formValue) {
|
|
165
163
|
if (formValue[key] === null) {
|
|
166
164
|
formValue[key] = undefined;
|
|
167
165
|
}
|
|
168
166
|
}
|
|
169
167
|
if (rowKey) {
|
|
170
|
-
var _formRef$current3, _formRef$current3$set;
|
|
168
|
+
var _formRef$current3, _formRef$current3$set, _prop$onChange;
|
|
171
169
|
formRef === null || formRef === void 0 ? void 0 : (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : (_formRef$current3$set = _formRef$current3.setFieldsValue) === null || _formRef$current3$set === void 0 ? void 0 : _formRef$current3$set.call(_formRef$current3, _defineProperty({}, rowKey, formValue));
|
|
170
|
+
(_prop$onChange = prop.onChange) === null || _prop$onChange === void 0 ? void 0 : _prop$onChange.call(prop, formValue[name]);
|
|
172
171
|
} else {
|
|
173
|
-
var _formRef$current4, _formRef$current4$set;
|
|
172
|
+
var _prop$onChange2, _formRef$current4, _formRef$current4$set;
|
|
173
|
+
(_prop$onChange2 = prop.onChange) === null || _prop$onChange2 === void 0 ? void 0 : _prop$onChange2.call(prop, formValue[name]);
|
|
174
174
|
formRef === null || formRef === void 0 ? void 0 : (_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 ? void 0 : (_formRef$current4$set = _formRef$current4.setFieldsValue) === null || _formRef$current4$set === void 0 ? void 0 : _formRef$current4$set.call(_formRef$current4, formValue);
|
|
175
175
|
}
|
|
176
176
|
};
|
|
@@ -495,12 +495,6 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
495
495
|
}
|
|
496
496
|
} catch (e) {}
|
|
497
497
|
}, [text, rest, fieldProps]);
|
|
498
|
-
// useEffect(() => {
|
|
499
|
-
// if (!prop.value) {
|
|
500
|
-
// handleClear();
|
|
501
|
-
// }
|
|
502
|
-
// console.log('value', prop.value);
|
|
503
|
-
// }, [prop.value]);
|
|
504
498
|
var tableDom = /*#__PURE__*/React.createElement(ProTable, _extends({
|
|
505
499
|
className: "ls-input-table",
|
|
506
500
|
columns: columns,
|
|
@@ -640,13 +634,13 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
|
|
|
640
634
|
name: [rowKey, textNameProp]
|
|
641
635
|
}, rest, {
|
|
642
636
|
noStyle: true
|
|
643
|
-
}), InputDom) :
|
|
637
|
+
}), InputDom) : (formRef === null || formRef === void 0 ? void 0 : formRef.current) ?
|
|
644
638
|
/*#__PURE__*/
|
|
645
639
|
// 在 ProTable 的查询面板中使用
|
|
646
640
|
React.createElement(_Form.Item, _extends({
|
|
647
641
|
name: textNameProp
|
|
648
642
|
}, rest, {
|
|
649
643
|
noStyle: true
|
|
650
|
-
}), InputDom));
|
|
644
|
+
}), InputDom) : /*#__PURE__*/React.createElement(React.Fragment, null, InputDom));
|
|
651
645
|
});
|
|
652
646
|
export default InputTable;
|