2019-06-24 00:29:14 +02:00
|
|
|
<template>
|
|
|
|
<div class="modal modal-otp" v-bind:class="{ 'is-active': isActive }">
|
2020-09-25 13:46:07 +02:00
|
|
|
<div class="modal-background" @click.stop="closeModal"></div>
|
|
|
|
<div class="modal-content">
|
|
|
|
<section class="section">
|
|
|
|
<div class="columns is-centered">
|
|
|
|
<div class="column is-three-quarters">
|
|
|
|
<div class="box has-text-centered has-background-black-ter is-shadowless">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2019-12-21 23:25:19 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-09-25 13:46:07 +02:00
|
|
|
</section>
|
|
|
|
</div>
|
2022-05-19 15:44:33 +02:00
|
|
|
<div v-if="this.showcloseButton" class="fullscreen-footer">
|
2020-09-25 13:46:07 +02:00
|
|
|
<!-- Close button -->
|
2022-09-21 21:38:53 +02:00
|
|
|
<button class="button is-dark is-rounded" @click.stop="closeModal">
|
2020-09-25 13:46:07 +02:00
|
|
|
{{ $t('commons.close') }}
|
2022-09-21 21:38:53 +02:00
|
|
|
</button>
|
2020-09-25 13:46:07 +02:00
|
|
|
</div>
|
2019-06-24 00:29:14 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'Modal',
|
2020-09-25 23:36:11 +02:00
|
|
|
|
2022-05-19 15:44:33 +02:00
|
|
|
data(){
|
|
|
|
return {
|
|
|
|
showcloseButton: this.closable,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2019-06-24 00:29:14 +02:00
|
|
|
props: {
|
|
|
|
value: Boolean,
|
2022-05-19 15:44:33 +02:00
|
|
|
closable: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
2019-06-24 00:29:14 +02:00
|
|
|
},
|
2020-09-25 23:36:11 +02:00
|
|
|
|
2019-06-24 00:29:14 +02:00
|
|
|
computed: {
|
|
|
|
isActive: {
|
|
|
|
get () {
|
|
|
|
return this.value
|
|
|
|
},
|
|
|
|
set (value) {
|
|
|
|
this.$emit('input', value)
|
|
|
|
}
|
|
|
|
}
|
2019-07-02 00:48:48 +02:00
|
|
|
},
|
2020-09-25 23:36:11 +02:00
|
|
|
|
2019-07-02 00:48:48 +02:00
|
|
|
methods: {
|
|
|
|
closeModal: function(event) {
|
|
|
|
if (event) {
|
|
|
|
this.isActive = false
|
2020-09-25 23:36:11 +02:00
|
|
|
this.$notify({ clean: true })
|
2019-07-02 00:48:48 +02:00
|
|
|
this.$parent.$emit('modalClose')
|
|
|
|
}
|
|
|
|
}
|
2019-06-24 00:29:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|