A input component that can create tags for the result display
npm install vue-input-text-to-tags --save
template:
<text-to-tags :list="list" @change="handleCcChange"></text-to-tags>
script:
//import
import TextToTags from 'vue-input-text-to-tags'
//define
components:{
TextToTags
},
data(){
return{
list:['tag1','tag2']
}
}
methods:{
handleCcChange(list){
console.log(list)
}
}
list: defalut array for the component