2021-08-02 12:22:30 +08:00
|
|
|
---
|
|
|
|
order: 99
|
|
|
|
title:
|
|
|
|
zh-CN: 各种混用的情况
|
|
|
|
en-US: Mixed usage
|
|
|
|
debug: true
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
测试 `count` `stauts` `color` `dot` 共用的情况。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Using `count/dot` with custom `stauts/color`.
|
|
|
|
|
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';
|
2021-08-02 12:22:30 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2021-08-02 12:22:30 +08:00
|
|
|
<>
|
|
|
|
<Badge count={5} status="success">
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
|
|
|
<Badge count={5} status="warning">
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
|
|
|
<Badge count={5} color="blue">
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
|
|
|
<Badge count={5} color="#fa541c">
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
|
|
|
<Badge dot status="success">
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
|
|
|
<Badge dot status="warning">
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
|
|
|
<Badge dot color="blue">
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
|
|
|
<Badge dot color="#fa541c">
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
2022-11-29 09:49:18 +08:00
|
|
|
<Badge count={0} showZero />
|
|
|
|
<Badge count={0} showZero color="blue" />
|
|
|
|
<Badge count={0} showZero color="#f0f" />
|
|
|
|
<Badge count={0} showZero>
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
|
|
|
<Badge count={0} showZero color="blue">
|
|
|
|
<Avatar shape="square" size="large" />
|
|
|
|
</Badge>
|
2022-04-03 23:27:45 +08:00
|
|
|
</>
|
2021-08-02 12:22:30 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2021-08-02 12:22:30 +08:00
|
|
|
```
|