@@ -5,15 +5,9 @@ import ProForm from '@ant-design/pro-form';
55import type { R } from '@/typings' ;
66import I18n from '@/utils/I18nUtils' ;
77import type { FullFormProps } from '.' ;
8+ import { defautlTitle } from '.' ;
89import { Button , Card } from 'antd' ;
910
10- export const defautlTitle = {
11- read : I18n . text ( 'form.read' ) ,
12- edit : I18n . text ( 'form.edit' ) ,
13- create : I18n . text ( 'form.create' ) ,
14- del : I18n . text ( 'form.del' ) ,
15- } ;
16-
1711const FullForm = < E , P = E > ( props : FullFormProps < E , P > ) => {
1812 const {
1913 formRef : currencyRef ,
@@ -65,7 +59,7 @@ const FullForm = <E, P = E>(props: FullFormProps<E, P>) => {
6559 req ?: ( body : P ) => Promise < R < any > > ,
6660 ) => {
6761 if ( req === undefined ) {
68- I18n . error ( { key : 'orm .error.request' , params : { title : defautlTitle [ st ] } } ) ;
62+ I18n . error ( { key : 'form .error.request' , params : { title : defautlTitle [ st ] } } ) ;
6963 return Promise . resolve ( false ) ;
7064 }
7165 setLoading ( true ) ;
@@ -121,10 +115,10 @@ const FullForm = <E, P = E>(props: FullFormProps<E, P>) => {
121115 ] ;
122116 } ,
123117 } }
124- { ...antProps }
125118 layout = "horizontal"
126119 labelCol = { labelCol || { sm : { span : 24 } , md : { span : 4 } } }
127120 wrapperCol = { wrapperCol }
121+ { ...antProps }
128122 formRef = { formRef }
129123 onFinish = { async ( values ) => {
130124 switch ( status ) {
0 commit comments