<tap-badge>
徽标与未读角标组件。支持数字、红点(dot)、最大上限数值以及包裹子元素定位。
Example
Loading...
<tap-badge .count=${"5"}></tap-badge> <tap-badge .count=${"99"}></tap-badge> <tap-badge .count=${"100"} .max=${99}></tap-badge> <tap-badge .dot=${true}></tap-badge> <tap-badge .count=${"NEW"} .color=${"positive"}></tap-badge>
API
Shadow DOM; Extends GemElement
Instance Properties
| Property(Attribute) | Reactive | Type | Description |
|---|---|---|---|
color(color) |
Yes | StringList<'positive' | 'informative' | 'notice'> |
|
count(count) |
Yes | string |
Support number and string |
dot(dot) |
Yes | boolean |
|
small(small) |
Yes | boolean |
|
max(max) |
Yes | number |
|
icon |
Yes | string | Element | DocumentFragment |
Other
| Type | Value |
|---|---|
| Slot | unnamed |
| Part | badge |
| CSS State | inline |
