Commit df585b3e by zhaochengxiang

bug fix

parent 2a617a4c
......@@ -171,15 +171,16 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
await save()
},
getModifyData: () => {
const newModifyData = [...modifyData]
for (const item of newModifyData??[]) {
if ((item.paths??[]).length > 0) {
item.dirIds = item.paths.map(_item => _item.value)
}
}
return {
elementList: elements,
rowDataList: produce(modifyData, (draft) => {
for (const item of draft??[]) {
if ((item.paths??[]).length > 0) {
item.dirIds = item.paths.map(_item => _item.value)
}
}
})
rowDataList: newModifyData
}
},
}), [form, editingKey, modifyData, elements])
......@@ -226,6 +227,7 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
type="primary"
onClick={ async () => {
const rows = colBatchEditForm.getFieldsValue()
if (!rows[element.name]) {
confirm?.()
return
......@@ -250,7 +252,7 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
setModifyData(newModifyData)
confirm?.()
} catch (e) {
console.log('e', e)
}
}}
>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment