mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-29 20:08:37 +08:00
39 lines
606 B
Markdown
39 lines
606 B
Markdown
---
|
|
order: 0
|
|
title:
|
|
zh-CN: 向上展开
|
|
en-US: Placement
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
向上展开建议。
|
|
|
|
## en-US
|
|
|
|
Change the suggestions placement.
|
|
|
|
````jsx
|
|
import { Mention } from 'antd';
|
|
|
|
const { toString } = Mention;
|
|
|
|
function onChange(contentState) {
|
|
console.log(toString(contentState));
|
|
}
|
|
|
|
function onSelect(suggestion) {
|
|
console.log('onSelect', suggestion);
|
|
}
|
|
|
|
ReactDOM.render(
|
|
<Mention
|
|
style={{ width: '100%' }}
|
|
onChange={onChange}
|
|
suggestions={['afc163', 'benjycui', 'yiminghe', 'RaoHai', '中文', 'にほんご']}
|
|
onSelect={onSelect}
|
|
placement="top"
|
|
/>,
|
|
mountNode);
|
|
````
|