Parcourir la source

feat: 表单新增name属性。 配置name后,可以解决同一个页面有多个表单且存在相同字段时, 生成的组件字段的id相同的问题

zuihou il y a 3 ans
Parent
commit
a343b49014
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      src/components/Form/src/types/form.ts

+ 1 - 0
src/components/Form/src/types/form.ts

@@ -49,6 +49,7 @@ export type RegisterFn = (formInstance: FormActionType) => void;
 export type UseFormReturnType = [RegisterFn, FormActionType];
 
 export interface FormProps {
+  name?: string;
   layout?: 'vertical' | 'inline' | 'horizontal';
   // Form value
   model?: Recordable;