From 0e6ea3ead02c7b51fac7c5776c92044abeaa4dc3 Mon Sep 17 00:00:00 2001 From: xuqingkai Date: Thu, 8 Aug 2024 14:03:44 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20=20=E8=A1=A5?= =?UTF-8?q?=E5=85=85Form=E8=AE=BE=E7=BD=AEerror-type=E7=9A=84=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/component/form.md | 78 +++++++++++++++++++++------------------- src/pages.json | 10 ++++++ src/pages/form/Index.vue | 10 ++++++ src/pages/form/demo4.vue | 61 +++++++++++++++++++++++++++++++ 4 files changed, 122 insertions(+), 37 deletions(-) create mode 100644 src/pages/form/demo4.vue diff --git a/docs/component/form.md b/docs/component/form.md index b6cfd11e..03a35b16 100644 --- a/docs/component/form.md +++ b/docs/component/form.md @@ -137,7 +137,7 @@ const model = reactive<{ const form = ref() -function handleSubmit1() { +function handleSubmit() { form.value .validate() .then(({ valid, errors }) => { @@ -154,7 +154,6 @@ function handleSubmit1() { ``` - ::: ## 校验规则 @@ -403,62 +402,59 @@ const submit = () => { ::: code-group ```html [vue] - + + + 提交 + - - - 提交 - ``` ```typescript [typescript]