34 lines
940 B
Vue
34 lines
940 B
Vue
<template>
|
|
<div>
|
|
<p v-html="content"></p>
|
|
<p class="border-bottom mt-3 mb-5"></p>
|
|
<div class="field is-grouped">
|
|
<div class="control is-expanded">
|
|
<button class="button is-primary has-text-white" @click="confirm()">{{ store.lang==='en'? 'Accept' : 'Đồng ý'}} </button>
|
|
<button class="button is-dark ml-5" @click="cancel()">{{store.lang==='en'? 'Cancel' : 'Hủy bỏ'}} </button>
|
|
</div>
|
|
<div class="control" v-if="duration">
|
|
<CountDown v-bind="{duration: duration}" @close="cancel()"></CountDown>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { useStore } from '~/stores/index'
|
|
export default {
|
|
setup() {
|
|
const store = useStore()
|
|
return { store }
|
|
},
|
|
props: ['content', 'duration'],
|
|
methods: {
|
|
cancel() {
|
|
this.$emit('close')
|
|
},
|
|
confirm() {
|
|
this.$emit('modalevent', {name: 'confirm'})
|
|
this.cancel()
|
|
}
|
|
}
|
|
}
|
|
</script> |