Tag
Install
Register component globally via app.use, refer to Component Registration for more registration ways。
Usage
Basic Usage
Plain style
Round style
Mark style
Closeable
Custom Size
Custom Color
API
Props
| Attribute |
Description |
Type |
Default |
| type |
Type, can be set to primary success danger warning |
string |
default |
| size |
Size, can be set to large medium |
string |
- |
| color |
Custom color |
string |
- |
| show |
Whether to show tag |
boolean |
true |
| plain |
Whether to be plain style |
boolean |
false |
| round |
Whether to be round style |
boolean |
false |
| mark |
Whether to be mark style |
boolean |
false |
| text-color |
Text color |
string |
white |
| closeable |
Whether to be closeable |
boolean |
false |
Slots
| Name |
Description |
| default |
Default slot |
Events
| Event |
Description |
Arguments |
| click |
Emitted when component is clicked |
event: MouseEvent |
| close |
Emitted when close icon is clicked |
event: MouseEvent |
Less Variables
How to use: Custom Theme.
| Name |
Default Value |
Description |
| @tag-padding |
0 @padding-base |
- |
| @tag-text-color |
@white |
- |
| @tag-font-size |
@font-size-sm |
- |
| @tag-border-radius |
2px |
- |
| @tag-line-height |
16px |
- |
| @tag-medium-padding |
2px 6px |
- |
| @tag-large-padding |
@padding-base @padding-xs |
- |
| @tag-large-border-radius |
@border-radius-md |
- |
| @tag-large-font-size |
@font-size-md |
- |
| @tag-round-border-radius |
@border-radius-max |
- |
| @tag-danger-color |
@red |
- |
| @tag-primary-color |
@blue |
- |
| @tag-success-color |
@green |
- |
| @tag-warning-color |
@orange |
- |
| @tag-default-color |
@gray-6 |
- |
| @tag-plain-background-color |
@white |
- |