feat(新组件): 封装遮罩层组件

This commit is contained in:
hzj 2025-09-11 12:28:51 +08:00
parent 0b4e4a33b3
commit fd7ea51b4f

View 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>