From 6228216e5f02bd3a5fe89d1b3b3edcfc20524c23 Mon Sep 17 00:00:00 2001 From: xuan-T <1093000545@qq.com> Date: Thu, 20 Jul 2023 15:21:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9FForm=20rules=20ts=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/form/interface.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/form/interface.ts b/components/form/interface.ts index e431c123..55b9de99 100644 --- a/components/form/interface.ts +++ b/components/form/interface.ts @@ -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[]; } @@ -65,9 +65,9 @@ export const formItemProps = { default: null as boolean, }, rules: { - type: Array as PropType, + type: Array as PropType, default: () => { - return [] as FRormRuleItem[]; + return [] as FFormRuleItem[]; }, }, } as const; @@ -95,7 +95,7 @@ export interface FormItemInject { export interface Field { prop: string; value: any; - rules: FRormRuleItem[]; + rules: FFormRuleItem[]; validateRules: (trigger?: string | string[]) => Promise; clearValidate: () => void; resetField: () => void;