lu-lowcode-package-form 0.9.91 → 0.9.92
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 +4 -4
- package/dist/index.es.js +297 -289
- package/package.json +1 -1
- package/src/App.jsx +1 -9
- package/src/components/field/select/select.jsx +1 -1
- package/src/components/field/table/index.jsx +2 -2
package/package.json
CHANGED
package/src/App.jsx
CHANGED
@@ -99,15 +99,7 @@ function App() {
|
|
99
99
|
}
|
100
100
|
}
|
101
101
|
const setFormFields = () => {
|
102
|
-
formRef?.current?.formRef?.setFieldsValue({
|
103
|
-
datetime: "2024-08-25", datetime2: "2024-08-25", datetime3: "",
|
104
|
-
"remark11": { label: '选项1', value: '1', name: "1111", table: "[{\"price\":1,\"num\":2},{\"price\":2,\"num\":2},{\"price\":3,\"num\":3},{\"price\":3,\"num\":3}]" },
|
105
|
-
"remark12": [{ "label": "选项1", "value": "1" }, { "label": "选项2", "value": "2" }],
|
106
|
-
"userselect": "1213131", "DeptSelect": ["leaf11"],
|
107
|
-
"searchuser": [{ "id": 2, "name": "2222", "label": "2222", "value": 2 }, { "id": 4, "name": "4444", "label": "4444", "value": 4 }],
|
108
|
-
"PostSelect": '["parent 1-1","leaf11"]', "table": [{ "product_price1": "12", "product_num1": "123", "product_sum1": "1476", "node_oclxmzswzti": "", "select2": "" }, { "product_price1": "123", "product_num1": "213", "product_sum1": "26199", "node_oclxmzswzti": "", "select2": "" }],
|
109
|
-
"product_total_price": "0.00", "product_price": "213", "product_num": "21", "product_num_range": [1, 22], "product_sum": "4473", "switch": false
|
110
|
-
})
|
102
|
+
formRef?.current?.formRef?.setFieldsValue({"userselect":"1213131","remark11":{"label":"选项1","value":"1","name":"1111","table":"[{\"price\":1,\"num\":2, \"remark11\":\"{ label: '选项3', value: '3' }\"},{\"price\":2,\"num\":2},{\"price\":3,\"num\":3},{\"price\":3,\"num\":3}]"},"table":[{"product_num1":"123","product_sum1":"","node_oclxmzswzti":"","select2":"","switch_table":false,"remark11":{"label":"选项2","value":"2"},"product_price12":""},{"product_num1":"213","product_sum1":"","node_oclxmzswzti":"","select2":"","switch_table":false,"datetime2":"2024-08-22 11:09:07","product_price13":1,"product_price14":2,"product_price12":"","remark11":{"label":"选项3","value":"3"}}],"product_total_price":"0.00","DeptSelect":["leaf11"],"PostSelect":["parent 1-1","leaf11"],"searchuser":[{"id":2,"name":"2222","label":"2222","value":2},{"id":4,"name":"4444","label":"4444","value":4}],"product_price":"213","product_num":"21","product_num_range":[1,22],"product_sum":"4473","switch":false,"datetime":"2024-08-25","datetime2":"2024-08-25","datetime3":"","datetime4":"2024-08-22 11:09:04","remark12":[{"label":"选项1","value":"1"},{"label":"选项2","value":"2"}]})
|
111
103
|
}
|
112
104
|
const handleCols = () => {
|
113
105
|
setCols(cols - 1)
|
@@ -81,8 +81,8 @@ const WithSingleSelect = ({ readItemRender, readonly, onChange, onCustomChange,v
|
|
81
81
|
// onChange(value)
|
82
82
|
form?.setFieldValue(fieldName, value )
|
83
83
|
console.log("WithSingleSelect useEffect onChange////// form",form)
|
84
|
+
console.log("WithSingleSelect useEffect onChange////// fieldName",fieldName)
|
84
85
|
console.log("WithSingleSelect useEffect onChange////// value",value)
|
85
|
-
console.log("WithSingleSelect useEffect onChange////// props",props)
|
86
86
|
} catch (error) {
|
87
87
|
console.log("WithSingleSelect useEffect error",error)
|
88
88
|
}
|
@@ -61,7 +61,7 @@ const Table = ({ children, onTableAddRow,disabled,readonly,onTableRemoveRow, for
|
|
61
61
|
</div>}
|
62
62
|
{fields.map((field, index) => (
|
63
63
|
<div key={field.key} className="fborder-b fflex flex-nowrap fmin-w-full ">
|
64
|
-
|
64
|
+
|
65
65
|
{React.Children.map(children, (child, childIndex) => {
|
66
66
|
let { props } = child;
|
67
67
|
const col_id = child?.props?.componentId || child?.props?.__id || childIndex;
|
@@ -92,7 +92,7 @@ const Table = ({ children, onTableAddRow,disabled,readonly,onTableRemoveRow, for
|
|
92
92
|
subTableIndex: index,
|
93
93
|
subTableHead: index == 0,
|
94
94
|
form,
|
95
|
-
fieldName: [field.name, col_id],
|
95
|
+
fieldName: [fieldName,field.name, col_id],
|
96
96
|
})}
|
97
97
|
</Form.Item>
|
98
98
|
</TableCol>
|