lu-lowcode-package-form 0.9.85 → 0.9.88
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.cjs.js +3 -3
- package/dist/index.es.js +284 -290
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.jsx +311 -305
- package/src/components/field/select/search-select.jsx +20 -20
- package/src/components/field/select/select.jsx +1 -0
- package/src/components/form-container/index.jsx +3 -3
@@ -36,26 +36,26 @@ const SearchSelect = ({ addWrapper = true, value, type, defaultValue, onChange,
|
|
36
36
|
|
37
37
|
}
|
38
38
|
|
39
|
-
useEffect(() => {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
}, [value, nOptions])
|
39
|
+
// useEffect(() => {
|
40
|
+
// console.log("useEffect SearchSelect value", value)
|
41
|
+
// if (value && nOptions.length > 0) {
|
42
|
+
// let item = value
|
43
|
+
// if (Array.isArray(value)) {
|
44
|
+
// item = nOptions.filter(item => {
|
45
|
+
// return value.filter(v => item.value == v?.value || item.value == v).length > 0
|
46
|
+
// })
|
47
|
+
// }
|
48
|
+
// else {
|
49
|
+
// item = nOptions.find(item => item.value == value?.value || item.value == value)
|
50
|
+
// }
|
51
|
+
|
52
|
+
// if (item && !isEqual(item, value)) {
|
53
|
+
// onChange(item)
|
54
|
+
// console.log("SearchSelect onChange value", item)
|
55
|
+
// }
|
56
|
+
|
57
|
+
// }
|
58
|
+
// }, [value, nOptions])
|
59
59
|
|
60
60
|
const handleSearch = debounce(async (value) => {
|
61
61
|
const params = { ...requestParams }
|
@@ -234,7 +234,8 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
234
234
|
})
|
235
235
|
debounceHandleFieldsChange();
|
236
236
|
}
|
237
|
-
|
237
|
+
console.log("idGroups",idGroups)
|
238
|
+
if (idGroups.length > 0) idGroups.forEach(ids => { if (Array.isArray(ids) && ids.length > 0) handleTableAddRow(ids) })
|
238
239
|
}, 200)
|
239
240
|
|
240
241
|
}
|
@@ -338,9 +339,8 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
338
339
|
}
|
339
340
|
|
340
341
|
if (formula && formula.length > 0) {
|
342
|
+
console.log(`${identifier} 计算公式:`, formula)
|
341
343
|
const formulaResult = evalFormula(formula);
|
342
|
-
|
343
|
-
|
344
344
|
form.setFieldValue(childIdentifier, formulaResult)
|
345
345
|
handleFieldsWith(childIdentifier, form.getFieldsValue())
|
346
346
|
}
|