use createFormActions instead of createSyncFormActions

This commit is contained in:
chenos 2020-12-10 20:39:15 +08:00
parent f8e8b2b9c7
commit f12c619603
4 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ export const DrawerForm = forwardRef((props: any, ref) => {
setVisible, setVisible,
getData: run, getData: run,
})); }));
const actions = createAsyncFormActions(); const actions = createFormActions();
const { title, fields: properties ={} } = props.schema||{}; const { title, fields: properties ={} } = props.schema||{};
console.log({onFinish}); console.log({onFinish});
return ( return (

View File

@ -15,7 +15,7 @@ import {
import { QuestionCircleOutlined } from '@ant-design/icons'; import { QuestionCircleOutlined } from '@ant-design/icons';
export function FilterForm(props: any) { export function FilterForm(props: any) {
const actions = createAsyncFormActions(); const actions = createFormActions();
const { title, fields: properties ={} } = props.schema||{}; const { title, fields: properties ={} } = props.schema||{};
return ( return (
<SchemaForm <SchemaForm

View File

@ -15,7 +15,7 @@ import {
import { QuestionCircleOutlined } from '@ant-design/icons'; import { QuestionCircleOutlined } from '@ant-design/icons';
export function Form(props: any) { export function Form(props: any) {
const actions = createAsyncFormActions(); const actions = createFormActions();
return ( return (
<Card bordered={false}> <Card bordered={false}>

View File

@ -16,7 +16,7 @@ import { QuestionCircleOutlined } from '@ant-design/icons';
import { Link, history, request, useModel, useLocation } from 'umi'; import { Link, history, request, useModel, useLocation } from 'umi';
export function Login(props: any) { export function Login(props: any) {
const actions = createAsyncFormActions(); const actions = createFormActions();
const { initialState = {}, loading, error, refresh, setInitialState } = useModel('@@initialState'); const { initialState = {}, loading, error, refresh, setInitialState } = useModel('@@initialState');
const { redirect } = props.location.query; const { redirect } = props.location.query;