mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 21:19:01 +08:00
form 添加外部修改值的方法
This commit is contained in:
parent
19492f4eda
commit
a9fecaeb35
@ -460,6 +460,18 @@ export default class Form extends React.Component<FormProps, object> {
|
||||
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<any>): Promise<any> {
|
||||
const {store, messages, translate: __} = this.props;
|
||||
this.flush();
|
||||
|
Loading…
Reference in New Issue
Block a user