Skip to content

Commit 67464fd

Browse files
committed
chore: update types
1 parent 1294220 commit 67464fd

File tree

9 files changed

+199
-646
lines changed

9 files changed

+199
-646
lines changed

antdv-demo

types/ant-design-vue.d.ts

-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ import { Drawer } from './drawer';
2828
import { Dropdown } from './dropdown/dropdown';
2929
import { Empty } from './empty';
3030
import { Form } from './form/form';
31-
import { FormModel } from './form-model/form';
32-
import { Icon } from './icon';
3331
import { Input } from './input/input';
3432
import { InputNumber } from './input-number';
3533
import { Layout } from './layout/layout';
@@ -102,8 +100,6 @@ export {
102100
Dropdown,
103101
Empty,
104102
Form,
105-
FormModel,
106-
Icon,
107103
Input,
108104
InputNumber,
109105
Layout,

types/form-model/form-item.d.ts

-69
This file was deleted.

types/form-model/form.d.ts

-176
This file was deleted.

types/form/form-item.d.ts

+14-6
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,43 @@
44

55
import { AntdComponent } from '../component';
66
import { Col } from '../grid/col';
7+
import { VNodeChild } from 'vue';
8+
9+
export declare type InternalNamePath = (string | number)[];
10+
export declare type NamePath = string | number | InternalNamePath;
711

812
export declare class FormItem extends AntdComponent {
913
/**
1014
* Used with label, whether to display : after label text.
1115
* @default true
1216
* @type boolean
1317
*/
14-
colon: boolean;
18+
colon?: boolean;
1519

1620
/**
1721
* The extra prompt message. It is similar to help. Usage example: to display error message and prompt message at the same time.
1822
* @type any (string | slot)
1923
*/
20-
extra: any;
24+
extra?: any;
2125

2226
/**
2327
* Used with validateStatus, this option specifies the validation status icon. Recommended to be used only with Input.
2428
* @default false
2529
* @type boolean
2630
*/
27-
hasFeedback: boolean;
31+
hasFeedback?: boolean;
2832

2933
/**
3034
* The prompt message. If not provided, the prompt message will be generated by the validation rule.
3135
* @type any (string | slot)
3236
*/
33-
help: any;
37+
help?: string | VNodeChild | JSX.Element;
3438

3539
/**
3640
* Label test
3741
* @type any (string | slot)
3842
*/
39-
label: any;
43+
label: string | VNodeChild | JSX.Element;
4044

4145
/**
4246
* The layout of label. You can set span offset to something like {span: 3, offset: 12} or sm: {span: 3, offset: 12} same as with <Col>
@@ -63,5 +67,9 @@ export declare class FormItem extends AntdComponent {
6367
*/
6468
wrapperCol: Col;
6569
labelAlign: 'left' | 'right';
66-
selfUpdate: boolean;
70+
name?: InternalNamePath;
71+
rules: object | object[];
72+
autoLink: boolean;
73+
validateFirst?: boolean;
74+
validateTrigger?: string | string[] | false;
6775
}

0 commit comments

Comments
 (0)