From cbec52936db52d5c57c454468a11bea1dbbcd058 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Tue, 28 Oct 2025 11:22:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(form):=20dialog=20submit=20event=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=88=B0=E7=9A=84changeRecords=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/form/src/FormBox.vue | 3 ++- packages/form/src/FormDialog.vue | 5 +++-- packages/form/src/FormDrawer.vue | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/form/src/FormBox.vue b/packages/form/src/FormBox.vue index 53a57c6b..629a1267 100644 --- a/packages/form/src/FormBox.vue +++ b/packages/form/src/FormBox.vue @@ -101,8 +101,9 @@ watchEffect(() => { const submitHandler = async () => { try { + const changeRecords = form.value?.changeRecords; const values = await form.value?.submitForm(); - emit('submit', values, { changeRecords: form.value?.changeRecords }); + emit('submit', values, { changeRecords }); } catch (e) { emit('error', e); } diff --git a/packages/form/src/FormDialog.vue b/packages/form/src/FormDialog.vue index 6488d247..d818f111 100644 --- a/packages/form/src/FormDialog.vue +++ b/packages/form/src/FormDialog.vue @@ -42,7 +42,7 @@ - 取 消 + 取 消 上一步 @@ -131,8 +131,9 @@ const closeHandler = () => { const save = async () => { try { + const changeRecords = form.value?.changeRecords; const values = await form.value?.submitForm(); - emit('submit', values, { changeRecords: form.value?.changeRecords }); + emit('submit', values, { changeRecords }); } catch (e) { emit('error', e); } diff --git a/packages/form/src/FormDrawer.vue b/packages/form/src/FormDrawer.vue index c7ad3a00..7e62b1c0 100644 --- a/packages/form/src/FormDrawer.vue +++ b/packages/form/src/FormDrawer.vue @@ -42,7 +42,7 @@ - 关闭 + 关闭 {{ confirmText }} @@ -109,8 +109,9 @@ watchEffect(() => { const submitHandler = async () => { try { + const changeRecords = form.value?.changeRecords; const values = await form.value?.submitForm(); - emit('submit', values, { changeRecords: form.value?.changeRecords }); + emit('submit', values, { changeRecords }); } catch (e) { emit('error', e); }