From b90d3572a9797d0c87ea27bf1a4a3f62eb3bc52c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wit=E3=80=86=E8=8B=97=E5=A4=A7?= <454690789@qq.com> Date: Wed, 18 Jan 2023 22:43:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(AppendForm):=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=B7=BB=E5=8A=A0=E8=A1=A8=E5=8D=95=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=20=E6=8C=89=E9=92=AE=E7=82=B9=E5=87=BB=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=9C=AA=E4=BD=BF=E7=94=A8=E6=89=B9=E9=87=8F=E6=96=B9?= =?UTF-8?q?=E6=B3=95=20=E9=97=AE=E9=A2=98;=20=E8=A1=A8=E5=8D=95=E6=8E=92?= =?UTF-8?q?=E7=89=88=E6=94=B9=E7=94=A8baseColProps=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=87=8F=E5=B0=91=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=20(#2504)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(AppendForm): 修复 批量添加表单配置 按钮点击事件未使用批量方法 问题 * perf(AppendForm): 表单排版改用baseColProps一次配置,减少重复代码 Co-authored-by: 苗大 --- src/views/demo/form/AppendForm.vue | 32 ++++-------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/src/views/demo/form/AppendForm.vue b/src/views/demo/form/AppendForm.vue index f5f3a197..d35eaa06 100644 --- a/src/views/demo/form/AppendForm.vue +++ b/src/views/demo/form/AppendForm.vue @@ -4,7 +4,9 @@ @@ -28,32 +30,24 @@ field: 'field0a', component: 'Input', label: '字段0', - colProps: { - span: 8, - }, required: true, }, { field: 'field0b', component: 'Input', label: '字段0', - colProps: { - span: 8, - }, required: true, }, { field: '0', component: 'Input', label: ' ', - colProps: { - span: 8, - }, slot: 'add', }, ], labelWidth: 100, actionColOptions: { span: 24 }, + baseColProps: { span: 8 }, }); async function handleSubmit() { @@ -73,9 +67,6 @@ field: `field${n.value}a`, component: 'Input', label: '字段' + n.value, - colProps: { - span: 8, - }, required: true, }, '', @@ -85,9 +76,6 @@ field: `field${n.value}b`, component: 'Input', label: '字段' + n.value, - colProps: { - span: 8, - }, required: true, }, '', @@ -98,9 +86,6 @@ field: `${n.value}`, component: 'Input', label: ' ', - colProps: { - span: 8, - }, slot: 'add', }, '', @@ -117,27 +102,18 @@ field: `field${n.value}a`, component: 'Input', label: '字段' + n.value, - colProps: { - span: 8, - }, required: true, }, { field: `field${n.value}b`, component: 'Input', label: '字段' + n.value, - colProps: { - span: 8, - }, required: true, }, { field: `${n.value}`, component: 'Input', label: ' ', - colProps: { - span: 8, - }, slot: 'add', }, ],