From 3949e1c527598d7a275c780f4b535fb3a0547938 Mon Sep 17 00:00:00 2001 From: oasis-cloud <12181600+oasis-cloud@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:07:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(form):=20validateFields=20=E6=8C=82?= =?UTF-8?q?=E5=88=B0=E5=AE=9E=E4=BE=8B=E4=B8=8A=20(#1813)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 可以通过 getInternal 获取 validateFields 方法 * feat(form): validateFields 挂到实例上 --- src/packages/form/useform.taro.ts | 1 + src/packages/form/useform.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/packages/form/useform.taro.ts b/src/packages/form/useform.taro.ts index 582ec7a236..373ed2a9ba 100644 --- a/src/packages/form/useform.taro.ts +++ b/src/packages/form/useform.taro.ts @@ -189,6 +189,7 @@ class FormStore { getFieldsValue: this.getFieldsValue, setFieldsValue: this.setFieldsValue, resetFields: this.resetFields, + validateFields: this.validateFields, submit: this.submit, errors: this.errors, getInternal: this.getInternal, diff --git a/src/packages/form/useform.ts b/src/packages/form/useform.ts index 99451c16f0..0131a0a9ed 100644 --- a/src/packages/form/useform.ts +++ b/src/packages/form/useform.ts @@ -188,6 +188,7 @@ class FormStore { getFieldsValue: this.getFieldsValue, setFieldsValue: this.setFieldsValue, resetFields: this.resetFields, + validateFields: this.validateFields, submit: this.submit, errors: this.errors, getInternal: this.getInternal,