lu-lowcode-package-form 0.10.54 → 0.10.55
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs.js +236 -236
- package/dist/index.es.js +18837 -18817
- package/package.json +1 -1
- package/src/App.jsx +1 -1
- package/src/components/field/table/index.jsx +11 -0
package/package.json
CHANGED
package/src/App.jsx
CHANGED
@@ -277,7 +277,7 @@ function App() {
|
|
277
277
|
</Field.Table>
|
278
278
|
</Layout.FormRow>
|
279
279
|
<Layout.FormRow layout={'1'}>
|
280
|
-
<Field.Table label="子表格" __id="table" isAllowAdd={false} isAllowCopy={
|
280
|
+
<Field.Table label="子表格" __id="table" isAllowAdd={false} isAllowCopy={true} >
|
281
281
|
|
282
282
|
<Field.WithSingleSelect
|
283
283
|
isRequired={true} ref={testRef}
|
@@ -175,6 +175,17 @@ const Table = ({ children, onTableAddRow, disabled, readonly, onTableRemoveRow,
|
|
175
175
|
const copyRow = {...tableValues[index]}
|
176
176
|
tableValues.splice(index + 1, 0, copyRow)
|
177
177
|
form?.setFieldValue(fieldName, tableValues)
|
178
|
+
|
179
|
+
let changedFields = {}
|
180
|
+
let tableName = fieldName;
|
181
|
+
for (let i = index + 1; i < tableValues.length; i++) {
|
182
|
+
let value = tableValues[i]
|
183
|
+
for (let key in value) {
|
184
|
+
let changedFieldName = [tableName,i,key]
|
185
|
+
changedFields[changedFieldName] = { name: changedFieldName, value: value[key] }
|
186
|
+
}
|
187
|
+
}
|
188
|
+
typeof recordFieldsChange == "function" && recordFieldsChange(changedFields,true)
|
178
189
|
}} />}
|
179
190
|
<Popconfirm
|
180
191
|
title="删除确认"
|