From c26280a4d3e9d2de5050f7cdbe96f0ecc9c92427 Mon Sep 17 00:00:00 2001
From: jinhhanhan <1683105490@qq.com>
Date: Fri, 7 Aug 2026 10:31:57 +0800
Subject: [PATCH] =?UTF-8?q?refactor(form):=20=E9=87=8D=E6=9E=84=E6=8F=90?=
=?UTF-8?q?=E4=BA=A4=E9=80=BB=E8=BE=91=E4=BB=A5=E6=94=AF=E6=8C=81=E8=B7=A8?=
=?UTF-8?q?=E7=AB=AF=E7=BB=9F=E4=B8=80=E6=8E=A5=E7=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
diy-form 组件将提交事件机制改为函数 prop (onSubmit) 接管,避免 $listeners 在 MP 端不可用的问题。
formdata 页面使用 bind 预绑定 this,防止子组件调用时上下文漂移。
新增防重复提交标记复位逻辑,优化网络失败时的重试体验。
---
components-diy/diy-form.vue | 43 +++++++++++++------
components-diy/diy-recommend-code.vue | 4 ++
pages_tool/form/formdata.vue | 60 +++++++++++++++++++--------
3 files changed, 76 insertions(+), 31 deletions(-)
diff --git a/components-diy/diy-form.vue b/components-diy/diy-form.vue
index 985ba59..14c2300 100644
--- a/components-diy/diy-form.vue
+++ b/components-diy/diy-form.vue
@@ -22,13 +22,18 @@
- {{ submitText }}
+ {{ submitText }}