2018-02-07 10:44:11 +00:00
|
|
|
## API
|
|
|
|
|
2019-09-28 12:45:07 +00:00
|
|
|
```html
|
2018-03-09 09:50:33 +00:00
|
|
|
<a-badge :count="5">
|
2018-02-07 10:44:11 +00:00
|
|
|
<a href="#" class="head-example" />
|
|
|
|
</a-badge>
|
2019-09-28 12:45:07 +00:00
|
|
|
```
|
2018-02-07 10:44:11 +00:00
|
|
|
|
2018-03-09 09:50:33 +00:00
|
|
|
```html
|
|
|
|
<a-badge :count="5" />
|
2019-09-28 12:45:07 +00:00
|
|
|
```
|
2018-02-07 10:44:11 +00:00
|
|
|
|
2020-03-07 11:45:13 +00: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` | |
|