From 34bd7ef76dce651a78c6b6058bdb58b16eeaf262 Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Wed, 1 Apr 2020 10:11:44 +0800 Subject: [PATCH] fix: formmodel add ts types #1996 --- types/{n-form => form-model}/form-item.d.ts | 4 ++-- types/{n-form => form-model}/form.d.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename types/{n-form => form-model}/form-item.d.ts (95%) rename types/{n-form => form-model}/form.d.ts (94%) diff --git a/types/n-form/form-item.d.ts b/types/form-model/form-item.d.ts similarity index 95% rename from types/n-form/form-item.d.ts rename to types/form-model/form-item.d.ts index 0120457ee..1ae6721bc 100644 --- a/types/n-form/form-item.d.ts +++ b/types/form-model/form-item.d.ts @@ -5,7 +5,7 @@ import { AntdComponent } from '../component'; import { Col } from '../grid/col'; -export declare class NFormItem extends AntdComponent { +export declare class FormModelItem extends AntdComponent { /** * Used with label, whether to display : after label text. * @default true @@ -64,6 +64,6 @@ export declare class NFormItem extends AntdComponent { wrapperCol: Col; labelAlign: 'left' | 'right'; prop: string; - rules: object | array; + rules: object | object[]; autoLink: boolean; } diff --git a/types/n-form/form.d.ts b/types/form-model/form.d.ts similarity index 94% rename from types/n-form/form.d.ts rename to types/form-model/form.d.ts index 517184ecb..1786118f6 100644 --- a/types/n-form/form.d.ts +++ b/types/form-model/form.d.ts @@ -5,7 +5,7 @@ import { AntdComponent } from '../component'; import { Col } from '../grid/col'; import Vue from 'vue'; -import { NFormItem } from './form-item'; +import { FormModelItem } from './form-item'; declare interface ValidationRule { trigger?: string; @@ -79,8 +79,8 @@ declare interface ValidationRule { validator?: (rule: any, value: any, callback: Function) => any; } -export declare class NForm extends AntdComponent { - static Item: typeof NFormItem; +export declare class FormModel extends AntdComponent { + static Item: typeof FormModelItem; /** * Hide required mark of all form items