You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
1.7 KiB

<template>
1 month ago
<view class="popUpCommon">
<view class="mask" v-show="show" @click="closePop"></view>
<view :class="'popup-box mybox-leave-to'+(show?' mybox-enter':'') + (zIndex == 'top' ? ' highIndex' :'')" :style="'background:'+background+';'">
<img :src="cssUrl+'icon-popup-close.svg'" alt="" class="popup-box-close" @click="closePop" v-if="showClose">
1 year ago
<slot></slot>
</view>
1 month ago
</view>
</template>
<script>
export default {
name:"popUp",
props: {
background: {
type: String,
default: "#F8F8F8",
},
showClose:{
type: Boolean,
default: true,
},
zIndex:{
type: String,
default:'normal'
}
},
data() {
return {
show:false,
cssUrl:this.cssUrl1,
1 month ago
};
},
methods:{
1 month ago
closePop() {
1 year ago
this.show = false
1 month ago
this.$emit('closeCommonpop')
},
1 month ago
openPop() {
this.show = true
1 year ago
}
1 month ago
}
}
</script>
<style lang="scss" scoped>
.popUpCommon{
.mask{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 100vh;
z-index: 89;
background: rgba(0,0,0,0.27);
}
1 month ago
.popup-box{
width: 100%;
background: #FFFFFF;
border-radius: 40rpx 40rpx 0rpx 0rpx;
position: fixed;
bottom: 0;
left: 0;
z-index: 899;
1 month ago
max-height: calc(100vh - 20rpx);
overflow-y: auto;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
1 month ago
.popup-box-close{
1 year ago
position: absolute;
1 month ago
top: 46rpx;
right: 41rpx;
1 year ago
width: 40rpx;
height: 40rpx;
}
}
1 month ago
.highIndex{
z-index: 999;
}
.mybox-leave-to{
transition: all .8s ease;
transform:translate3d(0,100%,0);
}
.mybox-enter{
transition: all .8s ease;
transform:translate3d(0,0,0) !important;
}
1 month ago
}
</style>