From eb9f6e3790fd1909fd23df3970671cdf79636fd9 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 9 Aug 2025 09:40:48 +0000 Subject: [PATCH] =?UTF-8?q?update=20web/src/views/system/notice/modules/fo?= =?UTF-8?q?rm.vue.=20=E4=BF=AE=E5=A4=8D:=E6=98=BE=E7=A4=BA=20'Cannot=20rea?= =?UTF-8?q?d=20properties=20of=20undefined=20(reading=20'id')'=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Neil --- web/src/views/system/notice/modules/form.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/views/system/notice/modules/form.vue b/web/src/views/system/notice/modules/form.vue index 43e8137..32a92be 100644 --- a/web/src/views/system/notice/modules/form.vue +++ b/web/src/views/system/notice/modules/form.vue @@ -41,9 +41,10 @@ const [Modal, modalApi] = useModal({ if (isOpen) { isUpdate.value = false; formApi.resetForm(); - const {record} = modalApi.getData>(); + const data = modalApi.getData>(); + const record = data?.record; //编辑 - if (record.id) { + if (record?.id) { isUpdate.value = true; record.value = await api.get(record.id); await formApi.setValues(record.value); -- Gitee