mirror of https://github.com/doccano/doccano.git
pythondatasetnatural-language-processingdata-labelingmachine-learningannotation-tooldatasetsactive-learningtext-annotation
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
745 B
47 lines
745 B
<template>
|
|
<v-combobox
|
|
v-model="chips"
|
|
:items="labels"
|
|
chips
|
|
clearable
|
|
label="Label"
|
|
multiple
|
|
>
|
|
<template v-slot:selection="{ attrs, item, select, selected }">
|
|
<v-chip
|
|
v-bind="attrs"
|
|
:input-value="selected"
|
|
close
|
|
@click="select"
|
|
@click:close="remove(item)"
|
|
>
|
|
{{ item }}
|
|
</v-chip>
|
|
</template>
|
|
</v-combobox>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
labels: {
|
|
type: Array,
|
|
default: () => [],
|
|
required: true
|
|
}
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
chips: []
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
remove(item) {
|
|
this.chips.splice(this.chips.indexOf(item), 1)
|
|
this.chips = [...this.chips]
|
|
}
|
|
}
|
|
}
|
|
</script>
|