-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmodal.vue
52 lines (51 loc) · 1.05 KB
/
modal.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
<div>
<o-modal
:active="modelValue"
has-modal-card
can-cancel
:fullscreen="fullscreen"
@update:model-value="$emit('update:modelValue', $event)"
@close="close"
>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">
{{ title }}
</p>
<button
type="button"
class="delete"
@click="close"
/>
</header>
<section class="modal-card-body">
<div class="container">
<slot :close="close" />
<br>
</div>
</section>
</div>
</o-modal>
</div>
</template>
<script>
export default {
props: {
text: { type: String, default: '+' },
title: { type: String, default: '' },
modelValue: { type: Boolean },
fullscreen: { type: Boolean }
},
emits: ['input', 'update:modelValue'],
data () {
return {
}
},
methods: {
close () {
this.$emit('update:modelValue', false)
}
}
}
</script>