Skip to content

Tag 标签

标签组件,多色、可关闭、支持线框样式。

基础用法

vue
<template>
  <parrot-tag>默认</parrot-tag>
  <parrot-tag type="primary">主要</parrot-tag>
  <parrot-tag type="success">成功</parrot-tag>
  <parrot-tag type="warning">警告</parrot-tag>
  <parrot-tag type="danger">危险</parrot-tag>
</template>

可关闭

vue
<parrot-tag type="primary" closeable @close="handleClose">可关闭</parrot-tag>

线框

vue
<parrot-tag type="primary" plain>线框标签</parrot-tag>

圆角

vue
<parrot-tag type="primary" round>圆角标签</parrot-tag>

API

Props

属性类型默认值说明
typestring'default'类型
closeablebooleanfalse可关闭
sizestring'md'尺寸
roundbooleanfalse圆角
plainbooleanfalse线框

Events

事件说明
click点击
close关闭

Released under the MIT License.