I've implemented a VUEJS plugin (via CDN) and it works, but I cannot change the default props.. any idea how to change the defaults?
In the code below you can see my attempt to accomplish this
html:
<tags-dic element-id="tags" v-model="selectedTags" :typeahead="true"></tags-input>
<script src="https://cdn.jsdelivr.net/npm/@voerro/[email protected]/dist/voerro-vue-tagsinput.js"></script>
vue/javascript:
<script type="text/javascript">
var app = new Vue({
el: '#searchapp',
components: { "tags-dic": VoerroTagsInput },
data: {
query: "",
typeahead: true,
placeholder: 'Add a new tag',
limit: 1,
onlyExistingTags: true,
existingTags: [
'DNA',
'RNA',
'Protein',
],
selectedTags: [],
},
methods: {
submit: function() {
console.log("clicked");
if (this.query) {
console.log("OK");
}
}
}
})
</script>
Thanks
vue-tagsinputis a component, not a plugin