Skip to content

Commit

Permalink
fix: 修改FForm rules ts 类型
Browse files Browse the repository at this point in the history
  • Loading branch information
xuan-T committed Jul 20, 2023
1 parent 16a8798 commit 6228216
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/form/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FORM_LAYOUT, LABEL_POSITION } from './const';
import type { RuleItem, Rules } from 'async-validator';
import type { ExtractPublicPropTypes } from '../_util/interface';

export interface FRormRuleItem extends RuleItem {
export interface FFormRuleItem extends RuleItem {
trigger?: string | string[];
}

Expand Down Expand Up @@ -65,9 +65,9 @@ export const formItemProps = {
default: null as boolean,
},
rules: {
type: Array as PropType<FRormRuleItem[]>,
type: Array as PropType<FFormRuleItem[]>,
default: () => {
return [] as FRormRuleItem[];
return [] as FFormRuleItem[];
},
},
} as const;
Expand Down Expand Up @@ -95,7 +95,7 @@ export interface FormItemInject {
export interface Field {
prop: string;
value: any;
rules: FRormRuleItem[];
rules: FFormRuleItem[];
validateRules: (trigger?: string | string[]) => Promise<any>;
clearValidate: () => void;
resetField: () => void;
Expand Down

0 comments on commit 6228216

Please sign in to comment.