2020-12-14 05:05:14 +00:00
|
|
|
<template>
|
2021-08-08 07:12:29 +00:00
|
|
|
<SmartModal v-if="show" :title="$t('modal.confirm')" @close="hideModal">
|
2021-06-30 08:46:02 +00:00
|
|
|
<template #body>
|
2021-07-17 17:40:28 +00:00
|
|
|
<div class="flex flex-col px-2">
|
2021-08-13 11:14:02 +00:00
|
|
|
<label>
|
2021-07-09 17:19:45 +00:00
|
|
|
{{ title }}
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
2021-06-30 08:46:02 +00:00
|
|
|
</template>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<span>
|
2021-08-08 17:14:05 +00:00
|
|
|
<ButtonPrimary v-focus :label="yes" @click.native="resolve" />
|
2021-07-09 17:19:45 +00:00
|
|
|
<ButtonSecondary :label="no" @click.native="hideModal" />
|
2021-06-30 08:46:02 +00:00
|
|
|
</span>
|
|
|
|
|
</template>
|
2021-03-01 03:58:14 +00:00
|
|
|
</SmartModal>
|
2020-12-14 05:05:14 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2021-08-24 03:44:46 +00:00
|
|
|
import { defineComponent } from "@nuxtjs/composition-api"
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
2020-12-14 05:05:14 +00:00
|
|
|
props: {
|
|
|
|
|
show: Boolean,
|
2021-05-18 16:09:55 +00:00
|
|
|
title: { type: String, default: null },
|
2020-12-14 05:05:14 +00:00
|
|
|
yes: {
|
|
|
|
|
type: String,
|
2021-05-18 09:27:29 +00:00
|
|
|
default() {
|
2021-08-18 18:40:57 +00:00
|
|
|
return this.$t("action.yes")
|
2020-12-14 05:05:14 +00:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
no: {
|
|
|
|
|
type: String,
|
2021-05-18 09:27:29 +00:00
|
|
|
default() {
|
2021-08-18 18:40:57 +00:00
|
|
|
return this.$t("action.no")
|
2020-12-14 05:05:14 +00:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
hideModal() {
|
|
|
|
|
this.$emit("hide-modal")
|
|
|
|
|
},
|
|
|
|
|
resolve() {
|
|
|
|
|
this.$emit("resolve")
|
2021-07-07 23:28:42 +00:00
|
|
|
this.$emit("hide-modal")
|
2020-12-14 05:05:14 +00:00
|
|
|
},
|
|
|
|
|
},
|
2021-08-24 03:44:46 +00:00
|
|
|
})
|
2020-12-14 05:05:14 +00:00
|
|
|
</script>
|