ant-design/components/mentions/demo/autoSize.md
黑雨 066be35de3
feat: support options (#38876)
* feat: support options

* feat: update package

* feat: update package

* feat: update doc

* feat: update doc

* feat: update doc

* feat:  add test case
2022-11-23 21:00:24 +08:00

43 lines
542 B
Markdown

---
order: 6
title:
zh-CN: 自动大小
en-US: autoSize
---
## zh-CN
自适应内容高度。
## en-US
Height autoSize.
```tsx
import React from 'react';
import { Mentions } from 'antd';
const App: React.FC = () => (
<Mentions
autoSize
style={{ width: '100%' }}
options={[
{
value: 'afc163',
label: 'afc163',
},
{
value: 'zombieJ',
label: 'zombieJ',
},
{
value: 'yesmeck',
label: 'yesmeck',
},
]}
/>
);
export default App;
```