ant-design/components/mention/demo/multilines.md
2019-05-07 14:57:32 +08:00

528 B

order title
5
zh-CN en-US
多行 Multi-lines Mode

zh-CN

多行模式,多行模式必须指定高度。

en-US

Multi lines mode.

import { Mention } from 'antd';

const { toString } = Mention;

function onChange(editorState) {
  console.log(toString(editorState));
}

ReactDOM.render(
  <Mention
    style={{ width: '100%', height: 100 }}
    onChange={onChange}
    defaultSuggestions={['afc163', 'benjycui', 'yiminghe', 'jljsj33', 'dqaria', 'RaoHai']}
    multiLines
  />,
  mountNode,
);