From 13076d4728d3e1b63c996cc0d267de90ea280b08 Mon Sep 17 00:00:00 2001 From: sws <1141121512@qq.com> Date: Wed, 4 Sep 2024 11:55:40 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E6=83=A0=E5=88=B8=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=81=94=E8=B0=83=20sws=202024-09-03?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/layout/components/navbar/index.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/layout/components/navbar/index.vue b/src/views/layout/components/navbar/index.vue index dac3fbdd..0ec9a29f 100644 --- a/src/views/layout/components/navbar/index.vue +++ b/src/views/layout/components/navbar/index.vue @@ -57,11 +57,21 @@ const modelValue = defineModel({ type: Object, default: {} }); // #region 变量 --------------------start const is_custom_dialog = ref(false); const dialog_visible = ref(false); +watch(dialog_visible, (val) => { + if (val) { + form.value = { + logo: modelValue.value.logo.length > 0 ? [{ url: modelValue.value.logo }] : [], + name: modelValue.value.name, + describe: modelValue.value.describe, + is_enable: modelValue.value.is_enable, + }; + } +}); const form = ref({ - logo: modelValue.value.logo.length > 0 ? [{ url: modelValue.value.logo }] : [], - name: modelValue.value.name, - describe: modelValue.value.describe, - is_enable: modelValue.value.is_enable, + logo: [] as any[], + name: '', + describe: '', + is_enable: '', }); const ruleFormRef = ref(); const rules = reactive({