2018-09-12 06:22:17 +00:00
|
|
|
<template>
|
|
|
|
<transition name="modal">
|
2021-07-05 10:29:04 +00:00
|
|
|
<div class="modal-mask has-overflow" :class="{'has-overflow': overflow}">
|
2021-09-21 16:37:56 +00:00
|
|
|
<div class="modal-container"
|
|
|
|
@mousedown.self.prevent.stop="$emit('close')"
|
|
|
|
:class="{'has-overflow': overflow}"
|
|
|
|
@shortkey="$emit('close')"
|
|
|
|
v-shortkey="['esc']"
|
|
|
|
>
|
2021-01-30 16:17:04 +00:00
|
|
|
<div class="modal-content" :class="{'has-overflow': overflow, 'is-wide': wide}">
|
2021-01-16 21:15:48 +00:00
|
|
|
<slot>
|
2021-01-17 17:57:57 +00:00
|
|
|
<div class="header">
|
|
|
|
<slot name="header"></slot>
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<slot name="text"></slot>
|
|
|
|
</div>
|
|
|
|
<div class="actions">
|
|
|
|
<x-button
|
|
|
|
@click="$emit('close')"
|
|
|
|
type="tertary"
|
|
|
|
class="has-text-danger"
|
|
|
|
>
|
2021-06-23 23:24:57 +00:00
|
|
|
{{ $t('misc.cancel') }}
|
2021-01-17 17:57:57 +00:00
|
|
|
</x-button>
|
|
|
|
<x-button
|
|
|
|
@click="$emit('submit')"
|
|
|
|
type="primary"
|
|
|
|
:shadow="false"
|
|
|
|
>
|
2021-06-23 23:24:57 +00:00
|
|
|
{{ $t('misc.doit') }}
|
2021-01-17 17:57:57 +00:00
|
|
|
</x-button>
|
|
|
|
</div>
|
2021-01-16 21:15:48 +00:00
|
|
|
</slot>
|
2018-09-12 06:22:17 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-09-05 20:35:52 +00:00
|
|
|
export default {
|
|
|
|
name: 'modal',
|
2021-01-21 22:33:16 +00:00
|
|
|
props: {
|
|
|
|
overflow: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
2021-01-30 16:17:04 +00:00
|
|
|
wide: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false,
|
|
|
|
},
|
2021-01-21 22:33:16 +00:00
|
|
|
},
|
2020-09-05 20:35:52 +00:00
|
|
|
}
|
2018-09-12 06:22:17 +00:00
|
|
|
</script>
|