2018-02-07 18:44:11 +08:00
|
|
|
## API
|
|
|
|
|
2019-09-28 20:45:07 +08:00
|
|
|
```html
|
2018-03-09 17:50:33 +08:00
|
|
|
<a-badge :count="5">
|
2018-02-07 18:44:11 +08:00
|
|
|
<a href="#" class="head-example" />
|
|
|
|
</a-badge>
|
2019-09-28 20:45:07 +08:00
|
|
|
```
|
2018-02-07 18:44:11 +08:00
|
|
|
|
2018-03-09 17:50:33 +08:00
|
|
|
```html
|
|
|
|
<a-badge :count="5" />
|
2019-09-28 20:45:07 +08:00
|
|
|
```
|
2018-02-07 18:44:11 +08:00
|
|
|
|
2020-03-07 19:45:13 +08:00
|
|
|
| Property | Description | Type | Default | Version |
|
|
|
|
| --- | --- | --- | --- | --- |
|
|
|
|
| color | Customize Badge dot color | string | - | 1.5.0 |
|
|
|
|
| count | Number to show in badge | number\|string \| slot | | |
|
|
|
|
| dot | Whether to display a red dot instead of `count` | boolean | `false` | |
|
|
|
|
| offset | set offset of the badge dot, like [x, y] | [number\|string, number\|string] | - | |
|
|
|
|
| overflowCount | Max count to show | number | 99 | |
|
|
|
|
| showZero | Whether to show badge when `count` is zero | boolean | `false` | |
|
|
|
|
| status | Set Badge as a status dot | `success` \| `processing` \| `default` \| `error` \| `warning` | `''` | |
|
|
|
|
| text | If `status` is set, `text` sets the display text of the status `dot` | string | `''` | |
|
|
|
|
| numberStyle | sets the display style of the status `dot` | object | '' | |
|
|
|
|
| title | Text to show when hovering over the badge | string | `count` | |
|