Publishing TagInput component to npm
Published in
1 min readMar 20, 2017
#8 Wrapping TagInput component using the template from last tip
This is the repository and this is the code that matters
Lines 21 and 24 are where the magic happens. The input array is converted to string and bound to the input, and the input string is converted back to array before $emit it.
Demo 1
Demo 2
You can link in you own project using one of those urls:
- https://rawgit.com/vuejs-tips/v-tag-input/master/dist/v-tag-input.js
- https://unpkg.com/v-tag-input
- Or
yarn add v-tag-input
The final component has only 1KB (gziped). Pretty lite for a tag input, hum?