0👍
You should do something like:
<template>
<span>{{ labels }}</span><input type="text" v-model="labelString" @keyup.188="addLabels">
</template>
new Vue({
el: "#app",
data() {
return {
labelString: '',
labels: []
}
},
methods: {
addLabels() {
this.labels.push(this.labelString);
this.labelString = '';
},
}
})
And then then style the span
with labels to make it look as it’s located “inside” input
.
Source:stackexchange.com