vc-tag

Install

npm install vc-tag --save
// build version
import vcTag from 'vc-tag'
// recommend for *.vue project for small bundle size
import vcTag from 'vc-tag/src/Tag.vue'
// commonjs
require('./dist/build.min.js')
// script tag
<script src='./dist/build.min.js'></script>

Usage

props

show

label

size

closeable

disabled

status

onClose

afterClose

animationend callback

example

import Vue from 'vue'
import vcTag from '../dist/build.js'
new Vue({
el: '#app',
data () {
return {
bools: {
'true': true,
'false': false
},
show: true,
label: '我是标签1',
size: 'default',
status: 'success',
disabled: false,
closeable: true,
onClose () {
console.log('will close tag')
},
afterClose () {
console.log('after close tag')
}
}
},
components: {
vcTag
}
})
<vc-tag
:show.sync="show"
:label="label"
:disabled="disabled"
:size="size"
:status="status"
:closeable="closeable"
:on-close="onClose"
:after-close="afterClose"
>
</vc-tag>