lu-lowcode-package-form 0.9.86 → 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 +2 -2
- package/dist/index.es.js +5 -11
- 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 +1 -2
@@ -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 }
|
@@ -339,9 +339,8 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
339
339
|
}
|
340
340
|
|
341
341
|
if (formula && formula.length > 0) {
|
342
|
+
console.log(`${identifier} 计算公式:`, formula)
|
342
343
|
const formulaResult = evalFormula(formula);
|
343
|
-
|
344
|
-
|
345
344
|
form.setFieldValue(childIdentifier, formulaResult)
|
346
345
|
handleFieldsWith(childIdentifier, form.getFieldsValue())
|
347
346
|
}
|