2020-07-28 15:27:50 +08:00
|
|
|
---
|
2021-08-02 12:22:30 +08:00
|
|
|
order: 7
|
2020-07-28 15:27:50 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 大小
|
|
|
|
en-US: Size
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
可以设置有数字徽标的大小。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Set size of numeral Badge.
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2022-05-23 14:37:16 +08:00
|
|
|
import { Avatar, Badge } from 'antd';
|
2022-05-19 09:46:26 +08:00
|
|
|
import React from 'react';
|
2020-07-28 15:27:50 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2020-07-28 15:27:50 +08:00
|
|
|
<>
|
|
|
|
<Badge size="default" count={5}>
|
2021-08-02 12:22:30 +08:00
|
|
|
<Avatar shape="square" size="large" />
|
2020-07-28 15:27:50 +08:00
|
|
|
</Badge>
|
|
|
|
<Badge size="small" count={5}>
|
2021-08-02 12:22:30 +08:00
|
|
|
<Avatar shape="square" size="large" />
|
2020-07-28 15:27:50 +08:00
|
|
|
</Badge>
|
2022-04-03 23:27:45 +08:00
|
|
|
</>
|
2020-07-28 15:27:50 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2020-07-28 15:27:50 +08:00
|
|
|
```
|