lu-lowcode-package-form 0.10.34 → 0.10.35
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs.js +246 -246
- package/dist/index.es.js +22678 -22676
- package/package.json +1 -1
- package/src/components/field/select/search-select.jsx +0 -12
- package/src/components/field/table/index.jsx +11 -12
- package/src/components/form-container/index.jsx +2 -1
package/package.json
CHANGED
@@ -71,18 +71,6 @@ const SearchSelect = forwardRef(({ addWrapper = true, form, fieldName, fieldsVal
|
|
71
71
|
const initData = async (params) => {
|
72
72
|
let item = null
|
73
73
|
const ruleParams = {}
|
74
|
-
// if (Array.isArray(props?.filterRules)) {
|
75
|
-
// // 验证关联表字段是否需要重新渲染
|
76
|
-
// for (let rule of props?.filterRules) {
|
77
|
-
// let ruleValue;
|
78
|
-
// if (rule.value.parent === "")
|
79
|
-
// ruleValue = fieldsValue?.[rule.value.field_key];
|
80
|
-
// else
|
81
|
-
// ruleValue = fieldsValue?.[rule.value.parent]?.[fieldName?.[1]]?.[rule.value.field_key];
|
82
|
-
// if (ruleValue && ruleValue?.value) ruleValue = ruleValue.value;
|
83
|
-
// ruleParams[rule.column.column_name] = ruleValue ?? "##norequest##";
|
84
|
-
// }
|
85
|
-
// }
|
86
74
|
if (request && typeof request === 'function') {
|
87
75
|
debounceFetchOptions(params, ruleParams)
|
88
76
|
}
|
@@ -119,19 +119,18 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
|
|
119
119
|
// 验证关联表字段是否需要重新渲染
|
120
120
|
for (let rule of otherProps.filterRules) {
|
121
121
|
let prevFieldValue, curFieldValue;
|
122
|
-
if (rule
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
122
|
+
if (rule.valueType != "variable") continue
|
123
|
+
if ("parent" in rule?.value && rule.value.parent === "") {
|
124
|
+
prevFieldValue = prevValues?.[rule.value.field_key];
|
125
|
+
curFieldValue = curValues?.[rule.value.field_key];
|
126
|
+
} else {
|
127
|
+
prevFieldValue = prevValues?.[rule?.value?.parent]?.[field.name]?.[rule?.value?.field_key];
|
128
|
+
curFieldValue = curValues?.[rule?.value?.parent]?.[field.name]?.[rule?.value?.field_key];
|
129
|
+
}
|
130
130
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
}
|
131
|
+
if (prevFieldValue !== curFieldValue) {
|
132
|
+
result = true;
|
133
|
+
break;
|
135
134
|
}
|
136
135
|
}
|
137
136
|
}
|
@@ -500,7 +500,8 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
500
500
|
) {
|
501
501
|
// 验证关联表字段是否需要重新渲染
|
502
502
|
for (let rule of props.filterRules) {
|
503
|
-
if (rule.
|
503
|
+
if (rule.valueType != "variable") continue
|
504
|
+
if ("parent" in rule?.value && rule.value.parent != "") continue
|
504
505
|
let prevFieldValue, curFieldValue;
|
505
506
|
|
506
507
|
prevFieldValue = prevValues?.[rule.value.field_key];
|