custom-popup.vue
1.8 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<template>
<view class="mask-wrap" v-if="isShowPopup">
<view class="center-content">
<slot>
<view class="top-wrap">
<template v-if="isShowClose">
<image @click="closePopup" class="close-icon" src="/static/images/error.png"></image>
</template>
<view class="info-wrap">
<image src="/static/images/menu.png" mode=""></image>
<view class="right-info">
<view class="">春风吹三月</view>
</view>
</view>
</view>
</slot>
</view>
</view>
</template>
<script setup>
import { onMounted, ref } from 'vue'
const emits = defineEmits(['closePopup'])
const props = defineProps({
isShowPopup: {
type: Boolean,
default: false
},
isShowClose: {
type: Boolean,
default: false
}
})
function closePopup() {
emits('closePopup')
}
</script>
<style lang="scss">
.mask-wrap {
position: fixed;
top: 0;
left: 0;
right: 0;
width: 100vw;
height: 100vh;
z-index: 99999;
background-color: #00000066;
}
.center-content {
@include flexColumn();
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 686rpx;
padding: 48rpx 32rpx 24rpx 32rpx;
box-sizing: border-box;
background-color: #fff;
border-radius: 32rpx;
height: 720rpx;
border-radius: 0 0 12rpx 12rpx;
background: #151419ff;
.close-icon {
position: absolute;
right: 60rpx;
top: 70rpx;
width: 40rpx;
height: 40rpx;
}
.top-wrap {
width: 612rpx;
height: 180rpx;
border-radius: 16rpx;
background-color: #fcd09b;
}
.function-btns {
margin-top: 22rpx;
@include flexCj();
}
}
</style>