feat(新组件): 封装遮罩层组件
This commit is contained in:
parent
0b4e4a33b3
commit
fd7ea51b4f
31
src/components/MaskLayer.vue
Normal file
31
src/components/MaskLayer.vue
Normal file
@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<div
|
||||
style="
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #00000080;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
"
|
||||
v-show="maskLayerShow"
|
||||
>
|
||||
<div style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow-y: auto">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
maskLayerShow: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Loading…
x
Reference in New Issue
Block a user