mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 09:39:10 +08:00
066be35de3
* feat: support options * feat: update package * feat: update package * feat: update doc * feat: update doc * feat: update doc * feat: add test case
43 lines
542 B
Markdown
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;
|
|
```
|