2020-06-12 23:26:30 +08:00
|
|
|
---
|
|
|
|
order: 6
|
|
|
|
title:
|
|
|
|
zh-CN: 自动大小
|
|
|
|
en-US: autoSize
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
自适应内容高度。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Height autoSize.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2020-06-12 23:26:30 +08:00
|
|
|
import { Mentions } from 'antd';
|
2022-05-21 22:14:15 +08:00
|
|
|
import React from 'react';
|
2020-06-12 23:26:30 +08:00
|
|
|
|
|
|
|
const { Option } = Mentions;
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2020-06-12 23:26:30 +08:00
|
|
|
<Mentions autoSize style={{ width: '100%' }}>
|
|
|
|
<Option value="afc163">afc163</Option>
|
|
|
|
<Option value="zombieJ">zombieJ</Option>
|
|
|
|
<Option value="yesmeck">yesmeck</Option>
|
2022-04-03 23:27:45 +08:00
|
|
|
</Mentions>
|
2020-06-12 23:26:30 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2020-06-12 23:26:30 +08:00
|
|
|
```
|