This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
2021-01-30 16:17:04 +00:00
|
|
|
<template>
|
|
|
|
<modal
|
|
|
|
@close="$router.back()"
|
|
|
|
@submit="deleteList()"
|
|
|
|
>
|
2021-08-19 17:55:13 +00:00
|
|
|
<template #header><span>{{ $t('list.delete.header') }}</span></template>
|
|
|
|
|
|
|
|
<template #text>
|
|
|
|
<p>{{ $t('list.delete.text1') }}<br/>
|
|
|
|
{{ $t('list.delete.text2') }}</p>
|
|
|
|
</template>
|
2021-01-30 16:17:04 +00:00
|
|
|
</modal>
|
|
|
|
</template>
|
|
|
|
|
2022-02-15 12:07:34 +00:00
|
|
|
<script lang="ts">
|
2021-01-30 16:17:04 +00:00
|
|
|
export default {
|
|
|
|
name: 'list-setting-delete',
|
|
|
|
created() {
|
2021-09-08 09:59:38 +00:00
|
|
|
this.setTitle(this.$t('list.delete.title', {list: this.list.title}))
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
list() {
|
|
|
|
return this.$store.getters['lists/getListById'](this.$route.params.listId)
|
|
|
|
},
|
2021-01-30 16:17:04 +00:00
|
|
|
},
|
|
|
|
methods: {
|
2021-10-11 17:37:20 +00:00
|
|
|
async deleteList() {
|
|
|
|
await this.$store.dispatch('lists/deleteList', this.list)
|
|
|
|
this.$message.success({message: this.$t('list.delete.success')})
|
|
|
|
this.$router.push({name: 'home'})
|
2021-01-30 16:17:04 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|