mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +08:00
1.3 KiB
1.3 KiB
category | chinese | cols | type | english |
---|---|---|---|---|
Components | 提及 | 1 | Views | Mention |
Mention component。
When To Use
When need to mention someone or something.
<Mention
onChange={onChange}
suggestions={['afc163', 'benjycui', 'yiminghe', 'jljsj33', 'dqaria', 'RaoHai']}
/>,
API
Mention props
Property | Description | Type | Default |
---|---|---|---|
suggestions | suggestion content | Array or Array<Mention.Nav> | [] |
suggestionStyle | style of suggestion container | Objet | {} |
onSearchChange | Callback function called when search content changes | function(value:String) | [] |
onChange | Callback function called when content of input changes | function(value:String) | null |
notFoundContent | suggestion when suggestions empty | string | '无匹配结果,轻敲空格完成输入' |
loading | loading mode | boolean | false |
multiLines | multilines mode | boolean | false |
defaultValue | default value | string | null |
Nav props
Property | Description | Type | Default |
---|---|---|---|
value | value of suggestion,the value will insert into input filed while selected | string | "" |
children | suggestion content | Objet | {} |