Skip to content

Commit aa7d2d9

Browse files
committed
Merge branches 'feat-vue3' and 'feat-vue3' of https://github.com/vueComponent/ant-design-vue into feat-vue3
2 parents 44882ed + 5d14259 commit aa7d2d9

File tree

7 files changed

+339
-301
lines changed

7 files changed

+339
-301
lines changed

types/mentions/mentions.d.ts

Lines changed: 57 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,70 +3,73 @@
33

44
import { AntdComponent } from '../component';
55
import { Option } from './option';
6+
import { VNodeChild } from 'vue';
67

78
export declare class Mentions extends AntdComponent {
89
static Option: typeof Option;
9-
/**
10-
* Auto get focus when component mounted
11-
* @default false
12-
* @type boolean
13-
*/
14-
autofocus: boolean;
10+
$props: {
11+
/**
12+
* Auto get focus when component mounted
13+
* @default false
14+
* @type boolean
15+
*/
16+
autofocus?: boolean;
1517

16-
/**
17-
* Default value
18-
* @type string
19-
*/
20-
defaultValue: string;
18+
/**
19+
* Default value
20+
* @type string
21+
*/
22+
defaultValue?: string;
2123

22-
/**
23-
* Customize filter option logic
24-
* @type false | (input: string, option: OptionProps) => boolean
25-
*/
26-
filterOption: false | ((input: string, option: Option) => boolean);
24+
/**
25+
* Customize filter option logic
26+
* @type false | (input: string, option: OptionProps) => boolean
27+
*/
28+
filterOption?: false | ((input: string, option: Option) => boolean);
2729

28-
/**
29-
* Set mentions content when not match
30-
* @type any (string | slot)
31-
*/
32-
notFoundContent: any;
30+
/**
31+
* Set mentions content when not match
32+
* @type any (string | slot)
33+
*/
34+
notFoundContent?: VNodeChild | JSX.Element;
3335

34-
/**
35-
* Set popup placement
36-
* @default 'top'
37-
* @type string
38-
*/
39-
placement: 'top' | 'bottom';
36+
/**
37+
* Set popup placement
38+
* @default 'top'
39+
* @type string
40+
*/
41+
placement?: 'top' | 'bottom';
4042

41-
/**
42-
* Set trigger prefix keyword
43-
* @default '@'
44-
* @type string | string[]
45-
*/
46-
prefix: string | string[];
43+
/**
44+
* Set trigger prefix keyword
45+
* @default '@'
46+
* @type string | string[]
47+
*/
48+
prefix?: string | string[];
4749

48-
/**
49-
* Set split string before and after selected mention
50-
* @default ' '
51-
* @type string
52-
*/
53-
split: string;
50+
/**
51+
* Set split string before and after selected mention
52+
* @default ' '
53+
* @type string
54+
*/
55+
split?: string;
5456

55-
/**
56-
* Customize trigger search logic
57-
* @type (text: string, props: MentionsProps) => void
58-
*/
59-
validateSearch: (text: string, props: Mentions) => void;
57+
/**
58+
* Customize trigger search logic
59+
* @type (text: string, props: MentionsProps) => void
60+
*/
61+
validateSearch?: (text: string, props: Mentions) => void;
6062

61-
/**
62-
* Set value of mentions
63-
* @type string
64-
*/
65-
value: string;
63+
/**
64+
* Set value of mentions
65+
* @type string
66+
*/
67+
value?: string;
6668

67-
/**
68-
* Set the mount HTML node for suggestions
69-
* @default () => HTMLElement
70-
*/
71-
getPopupContainer: (triggerNode: HTMLElement) => HTMLElement;
69+
/**
70+
* Set the mount HTML node for suggestions
71+
* @default () => HTMLElement
72+
*/
73+
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
74+
}
7275
}

types/mentions/option.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
import { AntdComponent } from '../component';
55

66
export declare class Option extends AntdComponent {
7-
/**
7+
$props: {
8+
/**
89
* value of suggestion, the value will insert into input filed while selected
910
* @default ''
1011
* @type string
1112
*/
12-
value: string;
13+
value?: string;
14+
}
1315
}

types/notification.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface NotificationOptions extends NotificationConfigOptions {
2222
* The content of notification box (required)
2323
* @type string | VNode | Function
2424
*/
25-
description: VNodeChild | JSX.Element | Function;
25+
description?: VNodeChild | JSX.Element | Function;
2626

2727
/**
2828
* Customized icon

types/spin.d.ts

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,51 @@
55
import { AntdComponent } from './component';
66
import { VNodeChild } from 'vue';
77

8+
export interface SpinProps {
9+
/**
10+
* specifies a delay in milliseconds for loading state (prevent flush)
11+
* @type number (milliseconds)
12+
*/
13+
delay?: number;
14+
15+
/**
16+
* vue node of the spinning indicator
17+
* @type any (VNode | slot)
18+
*/
19+
indicator?: VNodeChild | JSX.Element;
20+
21+
/**
22+
* size of Spin, options: small, default and large
23+
* @default 'default'
24+
* @type string
25+
*/
26+
size?: 'small' | 'default' | 'large';
27+
28+
/**
29+
* whether Spin is spinning
30+
* @default true
31+
* @type boolean
32+
*/
33+
spinning?: boolean;
34+
35+
/**
36+
* customize description content when Spin has children
37+
* @type string
38+
*/
39+
tip?: string;
40+
41+
/**
42+
* className of wrapper when Spin has children
43+
* @type string
44+
*/
45+
wrapperClassName?: string;
46+
}
47+
848
export declare class Spin extends AntdComponent {
949
/**
1050
* As indicator, you can define the global default spin element
1151
* @param param0 indicator
1252
*/
1353
static setDefaultIndicator({ indicator }: { indicator: any }): void;
14-
$props: {
15-
16-
/**
17-
* specifies a delay in milliseconds for loading state (prevent flush)
18-
* @type number (milliseconds)
19-
*/
20-
delay?: number;
21-
22-
/**
23-
* vue node of the spinning indicator
24-
* @type any (VNode | slot)
25-
*/
26-
indicator?: VNodeChild | JSX.Element;
27-
28-
/**
29-
* size of Spin, options: small, default and large
30-
* @default 'default'
31-
* @type string
32-
*/
33-
size?: 'small' | 'default' | 'large';
34-
35-
/**
36-
* whether Spin is spinning
37-
* @default true
38-
* @type boolean
39-
*/
40-
spinning?: boolean;
41-
42-
/**
43-
* customize description content when Spin has children
44-
* @type string
45-
*/
46-
tip?: string;
47-
48-
/**
49-
* className of wrapper when Spin has children
50-
* @type string
51-
*/
52-
wrapperClassName?: string;
53-
}
54+
$props: SpinProps;
5455
}

types/table/column-group.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Definitions by: akki-jat <https://github.com/akki-jat>
33
// Definitions: https://github.com/vueComponent/ant-design-vue/types
44

5+
import { VNodeChild, Slots } from 'vue';
56
import { AntdComponent } from '../component';
6-
import { VNodeChild } from 'vue';
77

88
export declare class ColumnGroup extends AntdComponent {
99
$props: {
@@ -18,6 +18,6 @@ export declare class ColumnGroup extends AntdComponent {
1818
* such as slots: { title: 'XXX'}
1919
* @type object
2020
*/
21-
slots?: object;
21+
slots?: Slots;
2222
};
2323
}

0 commit comments

Comments
 (0)