mirror of https://github.com/doccano/doccano.git
Hironsan
5 years ago
2 changed files with 40 additions and 83 deletions
Split View
Diff Options
-
35frontend/components/containers/DocumentDeletionButton.vue
-
88frontend/pages/projects/_id/dataset/index.vue
@ -0,0 +1,35 @@ |
|||
<template> |
|||
<confirm-dialog |
|||
title="Delete Document" |
|||
message="Are you sure you want to delete these documents from this project?" |
|||
item-key="text" |
|||
:disabled="!isDocumentSelected" |
|||
:items="selected" |
|||
@ok="handleDeleteDocument()" |
|||
/> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState, mapGetters, mapActions } from 'vuex' |
|||
import ConfirmDialog from '@/components/organisms/ConfirmDialog' |
|||
|
|||
export default { |
|||
components: { |
|||
ConfirmDialog |
|||
}, |
|||
|
|||
computed: { |
|||
...mapState('documents', ['selected']), |
|||
...mapGetters('documents', ['isDocumentSelected']) |
|||
}, |
|||
|
|||
methods: { |
|||
...mapActions('documents', ['deleteDocument']), |
|||
|
|||
handleDeleteDocument() { |
|||
const projectId = this.$route.params.id |
|||
this.deleteDocument(projectId) |
|||
} |
|||
} |
|||
} |
|||
</script> |
Write
Preview
Loading…
Cancel
Save