From c8a375b492b8cdaebd2935d7b05f3b509165a0d6 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Mon, 24 Feb 2025 13:35:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BA=97=E9=93=BA=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=BC=96=E8=BE=91=E6=97=B6=E8=B4=A6=E5=8F=B7=E4=B8=BA?= =?UTF-8?q?=E9=9D=9E=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/shop/list/components/addShop.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/views/shop/list/components/addShop.vue b/src/views/shop/list/components/addShop.vue index b43e6a9..831c20f 100644 --- a/src/views/shop/list/components/addShop.vue +++ b/src/views/shop/list/components/addShop.vue @@ -402,6 +402,16 @@ function show(obj) { console.log(obj); state.form = { ...obj }; } + for (let key in state.rules) { + if (key === "accountName") { + if (obj.id) { + state.rules[key][0].required = false; + } else { + state.rules[key][0].required = true; + } + } + } + console.log(state.rules); } function close() { state.dialogVisible = false;