From a9fecaeb35bca2f44c327cfcc01983f3db7ac4b6 Mon Sep 17 00:00:00 2001 From: 2betop <2betop.cn@gmail.com> Date: Mon, 29 Jun 2020 13:03:41 +0800 Subject: [PATCH] =?UTF-8?q?form=20=E6=B7=BB=E5=8A=A0=E5=A4=96=E9=83=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=80=BC=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Form/index.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/renderers/Form/index.tsx b/src/renderers/Form/index.tsx index 0adb7579d..1fdbf67c6 100644 --- a/src/renderers/Form/index.tsx +++ b/src/renderers/Form/index.tsx @@ -460,6 +460,18 @@ export default class Form extends React.Component { return store.clearErrors(); } + getValues() { + const {store} = this.props; + this.flush(); + return store.data; + } + + setValues(value: any) { + const {store} = this.props; + this.flush(); + store.setValues(value); + } + submit(fn?: (values: object) => Promise): Promise { const {store, messages, translate: __} = this.props; this.flush();