2016-07-04 10:31:27 +08:00
|
|
|
---
|
|
|
|
order: 4
|
|
|
|
title: 多行
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
多行模式,多行模式必须指定高度。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Multi lines mode.
|
|
|
|
|
|
|
|
````jsx
|
|
|
|
import { Mention } from 'antd';
|
2016-07-19 12:31:03 +08:00
|
|
|
const { toString } = Mention;
|
2016-07-04 10:31:27 +08:00
|
|
|
|
2016-07-19 12:31:03 +08:00
|
|
|
function onChange(editorState) {
|
|
|
|
console.log(toString(editorState));
|
2016-07-04 10:31:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<Mention
|
2016-07-21 15:40:13 +08:00
|
|
|
style={{ width: 500, height: 100 }}
|
2016-07-04 10:31:27 +08:00
|
|
|
onChange={onChange}
|
|
|
|
suggestions={['afc163', 'benjycui', 'yiminghe', 'jljsj33', 'dqaria', 'RaoHai']}
|
|
|
|
multiLines
|
2016-07-21 15:40:13 +08:00
|
|
|
/>
|
|
|
|
, mountNode);
|
2016-07-04 10:31:27 +08:00
|
|
|
````
|