Commit 398a36c6 by zhaochengxiang

bug fix

parent e89c1310
......@@ -17,6 +17,7 @@ import produce from 'immer'
const pathElement = {
name: '资产目录',
supportBatchEdit: '是',
require: true,
}
//elementIds为空时,表示资源批量转资产.
......@@ -190,7 +191,6 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
<Form.Item
name={dataIndex}
label={element?.name}
rules={[{ required: true, message: `请输入${element?.name}!` }]}
style={{ marginBottom: 15 }}
>
{
......@@ -212,9 +212,14 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
size='small'
type="primary"
onClick={ async () => {
const rows = colBatchEditForm.getFieldsValue()
if (!rows[element.name]) {
confirm?.()
return
}
try {
await save()
const rows = await colBatchEditForm.validateFields()
const newModifyData = [...modifyData]
if (dataIndex === pathElement.name) {
for (const item of newModifyData) {
......@@ -295,6 +300,7 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
dataIndex: col.dataIndex,
colTitle: col.title,
editing: isEditing(record),
require: element.require,
loadingTreeData,
treeData,
})
......
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