|
| 1 | +// Project: https://github.com/vueComponent/ant-design-vue |
| 2 | +// Definitions: https://github.com/vueComponent/ant-design-vue/types |
| 3 | + |
| 4 | +import { AntdComponent } from '../component'; |
| 5 | +import { Option } from './option'; |
| 6 | + |
| 7 | +export declare class Mentions extends AntdComponent { |
| 8 | + static Option: typeof Option; |
| 9 | + /** |
| 10 | + * Auto get focus when component mounted |
| 11 | + * @default false |
| 12 | + * @type boolean |
| 13 | + */ |
| 14 | + autoFocus: boolean; |
| 15 | + |
| 16 | + /** |
| 17 | + * Default value |
| 18 | + * @type string |
| 19 | + */ |
| 20 | + defaultValue: string; |
| 21 | + |
| 22 | + /** |
| 23 | + * Customize filter option logic |
| 24 | + * @type false | (input: string, option: OptionProps) => boolean |
| 25 | + */ |
| 26 | + filterOption: false | ((input: string, option: Option) => boolean); |
| 27 | + |
| 28 | + /** |
| 29 | + * Set mentions content when not match |
| 30 | + * @type any (string | slot) |
| 31 | + */ |
| 32 | + notFoundContent: any; |
| 33 | + |
| 34 | + /** |
| 35 | + * Set popup placement |
| 36 | + * @default 'top' |
| 37 | + * @type string |
| 38 | + */ |
| 39 | + placement: 'top' | 'bottom'; |
| 40 | + |
| 41 | + /** |
| 42 | + * Set trigger prefix keyword |
| 43 | + * @default '@' |
| 44 | + * @type string | string[] |
| 45 | + */ |
| 46 | + prefix: string | string[]; |
| 47 | + |
| 48 | + /** |
| 49 | + * Set split string before and after selected mention |
| 50 | + * @default ' ' |
| 51 | + * @type string |
| 52 | + */ |
| 53 | + split: string; |
| 54 | + |
| 55 | + /** |
| 56 | + * Customize trigger search logic |
| 57 | + * @type (text: string, props: MentionsProps) => void |
| 58 | + */ |
| 59 | + validateSearch: (text: string, props: Mentions) => void; |
| 60 | + |
| 61 | + /** |
| 62 | + * Set value of mentions |
| 63 | + * @type string |
| 64 | + */ |
| 65 | + value: string; |
| 66 | + |
| 67 | + /** |
| 68 | + * Set the mount HTML node for suggestions |
| 69 | + * @default () => HTMLElement |
| 70 | + */ |
| 71 | + getPopupContainer: (triggerNode: HTMLElement) => HTMLElement; |
| 72 | +} |
0 commit comments