fix: 完善模板可视化编辑闭环与通用验收
This commit is contained in:
1 parent
fa6b492bce
commit
22a82dbfba
39 files changed
+7773
-443
No files matched your search
@@ -21,7 +21,7 @@ export function TemplateListField({
|
||||
},
|
||||
]}
|
||||
>
|
||||
{(rows, { add, remove }, { errors }) => (
|
||||
{(rows, { add, remove, move }, { errors }) => (
|
||||
<Space direction="vertical" style={{ width: "100%" }}>
|
||||
{rows.map((row, index) => (
|
||||
<Space key={row.key} align="start" wrap>
|
||||
@@ -40,6 +40,20 @@ export function TemplateListField({
|
||||
</Form.Item>
|
||||
))}
|
||||
<Button onClick={() => remove(row.name)}>删除</Button>
|
||||
<Button
|
||||
aria-label={`上移第 ${index + 1} 项`}
|
||||
disabled={index === 0}
|
||||
onClick={() => move(index, index - 1)}
|
||||
>
|
||||
上移
|
||||
</Button>
|
||||
<Button
|
||||
aria-label={`下移第 ${index + 1} 项`}
|
||||
disabled={index === rows.length - 1}
|
||||
onClick={() => move(index, index + 1)}
|
||||
>
|
||||
下移
|
||||
</Button>
|
||||
</Space>
|
||||
))}
|
||||
<Form.ErrorList errors={errors} />
|
||||
|
||||
Reference in new issue
Block a user