mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
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.
56 lines
1.1 KiB
56 lines
1.1 KiB
<template>
|
|
<div>
|
|
<v-btn
|
|
:disabled="!isLabelSelected"
|
|
class="text-capitalize"
|
|
outlined
|
|
@click="dialog=true"
|
|
>
|
|
Delete
|
|
</v-btn>
|
|
<v-dialog
|
|
v-model="dialog"
|
|
width="800"
|
|
>
|
|
<confirm-form
|
|
:items="selected"
|
|
title="Delete Label"
|
|
message="Are you sure you want to delete these labels from this project?"
|
|
item-key="text"
|
|
@ok="deleteLabel($route.params.id);dialog=false"
|
|
@cancel="dialog=false"
|
|
/>
|
|
</v-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapState, mapGetters, mapActions } from 'vuex'
|
|
import ConfirmForm from '@/components/organisms/utils/ConfirmForm'
|
|
|
|
export default {
|
|
components: {
|
|
ConfirmForm
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
dialog: false
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
...mapState('labels', ['selected']),
|
|
...mapGetters('labels', ['isLabelSelected'])
|
|
},
|
|
|
|
methods: {
|
|
...mapActions('labels', ['deleteLabel']),
|
|
|
|
handleDeleteLabel() {
|
|
const projectId = this.$route.params.id
|
|
this.deleteLabel(projectId)
|
|
}
|
|
}
|
|
}
|
|
</script>
|