|
3 | 3 |
|
4 | 4 | import { AntdComponent } from '../component'; |
5 | 5 | import { Option } from './option'; |
| 6 | +import { VNodeChild } from 'vue'; |
6 | 7 |
|
7 | 8 | export declare class Mentions extends AntdComponent { |
8 | 9 | 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; |
15 | 17 |
|
16 | | - /** |
17 | | - * Default value |
18 | | - * @type string |
19 | | - */ |
20 | | - defaultValue: string; |
| 18 | + /** |
| 19 | + * Default value |
| 20 | + * @type string |
| 21 | + */ |
| 22 | + defaultValue?: string; |
21 | 23 |
|
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); |
27 | 29 |
|
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; |
33 | 35 |
|
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'; |
40 | 42 |
|
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[]; |
47 | 49 |
|
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; |
54 | 56 |
|
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; |
60 | 62 |
|
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; |
66 | 68 |
|
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 | + } |
72 | 75 | } |
0 commit comments