Skip to content

Tag-DEMO ​


vue
<fv-Tag :modelValue="[{text: 'default', type: 'default' }]">
</fv-Tag>

Tag Different Types ​


vue
<fv-Tag :modelValue="[{text: 'default', type: 'default' }, {text: 'success', type: 'success' }, {text: 'warning', type: 'warning' }, {text: 'error', type: 'error' }]" :isDel="true" :isNewTag="true">
</fv-Tag>

Tag Customize Color ​


vue
<fv-Tag :modelValue="[{text: 'blue', type: 'default', background: 'rgba(0, 98, 158, 1)' }, {text: 'black', type: 'success', background: 'rgba(0, 0, 0, 1)' }, {text: 'pink', type: 'warning', background: 'pink' }]">
</fv-Tag>

Tag-Disabled ​

vue
<fv-Tag :modelValue="[{text: 'default', type: 'default' }, {text: 'disabled', type: 'success',  disabled: true }, {text: 'warning', type: 'warning' }]" :isDel="true" :isNewTag="true">
</fv-Tag>

Tag Dark Theme ​


vue
<fv-Tag :modelValue="[{text: 'default', type: 'default' }, {text: 'success', type: 'success' }, {text: 'warning', type: 'warning' }, {text: 'error', type: 'error' }]" theme="dark">
</fv-Tag>

属性 ​


属性类型必填默认值说明
modelValuearray否[]标签数组。
newTagPlaceholderstring否'New Tag'NewTag Placeholder
sizestring否''尺寸normal,medium,small,xsmall
newTagBackgroundany否nullNewTag按钮背景色。
fontSizenumber否12字体大小。
borderRadiusnumber否6圆角大小。
isNewTagboolean否false是否启用NewTag
isDelboolean否false是否启用删除按钮。
themestring否'global'主题样式。支持 global、light、dark、system 和 custom。
disabledboolean否false参见组件的 disabled 选项。
langstring否"global"参见组件的 lang 选项。

事件 ​


事件名参数说明
tag-clickobject标签点击时触发并返回点击项。
add-itemobject添加标签时触发并返回添加项。
del-itemobject删除标签时触发并返回删除项。

插槽 ​


  1. Default
javascript
<fv-tag>
    Content
</fv-tag>

MIT Licensed