yandere_fe/src/components/modal/modal.vue

30 lines
348 B
Vue
Raw Normal View History

2019-10-18 04:04:24 -07:00
<template>
<div
v-body-scroll-lock="true"
@click.self="closeModal"
class="modal-view"
>
<slot />
</div>
</template>
<script>
export default {
methods: {
closeModal () {
this.$emit('close')
}
}
}
</script>
<style lang="scss">
.modal-view {
body:not(.scroll-locked) & {
display: none;
}
}
</style>