Skip to content

Commit 34bd7ef

Browse files
committed
fix: formmodel add ts types #1996
1 parent c66177b commit 34bd7ef

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

types/n-form/form-item.d.ts renamed to types/form-model/form-item.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import { AntdComponent } from '../component';
66
import { Col } from '../grid/col';
77

8-
export declare class NFormItem extends AntdComponent {
8+
export declare class FormModelItem extends AntdComponent {
99
/**
1010
* Used with label, whether to display : after label text.
1111
* @default true
@@ -64,6 +64,6 @@ export declare class NFormItem extends AntdComponent {
6464
wrapperCol: Col;
6565
labelAlign: 'left' | 'right';
6666
prop: string;
67-
rules: object | array;
67+
rules: object | object[];
6868
autoLink: boolean;
6969
}

types/n-form/form.d.ts renamed to types/form-model/form.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import { AntdComponent } from '../component';
66
import { Col } from '../grid/col';
77
import Vue from 'vue';
8-
import { NFormItem } from './form-item';
8+
import { FormModelItem } from './form-item';
99

1010
declare interface ValidationRule {
1111
trigger?: string;
@@ -79,8 +79,8 @@ declare interface ValidationRule {
7979
validator?: (rule: any, value: any, callback: Function) => any;
8080
}
8181

82-
export declare class NForm extends AntdComponent {
83-
static Item: typeof NFormItem;
82+
export declare class FormModel extends AntdComponent {
83+
static Item: typeof FormModelItem;
8484

8585
/**
8686
* Hide required mark of all form items

0 commit comments

Comments
 (0)