2 changed files with 59 additions and 3 deletions
@ -0,0 +1,53 @@ |
|||||
|
<template> |
||||
|
<view class="slider-box-com"> |
||||
|
<view class="mask" v-show="show"></view> |
||||
|
<view :class="'slider-box mybox-leave-to'+(show?' mybox-enter':'')"> |
||||
|
</view> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name:"sliderBox", |
||||
|
data() { |
||||
|
return { |
||||
|
show:false |
||||
|
}; |
||||
|
}, |
||||
|
methods:{ |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.slider-box-com{ |
||||
|
.mask{ |
||||
|
position: fixed; |
||||
|
bottom: 0; |
||||
|
left: 0; |
||||
|
width: 100%; |
||||
|
height: 100vh; |
||||
|
z-index: 89; |
||||
|
background: rgba(0,0,0,0.27); |
||||
|
} |
||||
|
.slider-box{ |
||||
|
width: 100%; |
||||
|
background: #FFFFFF; |
||||
|
border-radius: 40rpx 40rpx 0rpx 0rpx; |
||||
|
position: fixed; |
||||
|
bottom: 0; |
||||
|
left: 0; |
||||
|
z-index: 899; |
||||
|
padding-bottom: constant(safe-area-inset-bottom); |
||||
|
padding-bottom: env(safe-area-inset-bottom); |
||||
|
} |
||||
|
.mybox-leave-to{ |
||||
|
transition: all .8s ease; |
||||
|
transform:translate3d(0,100%,0); |
||||
|
} |
||||
|
.mybox-enter{ |
||||
|
transition: all .8s ease; |
||||
|
transform:translate3d(0,0,0) !important; |
||||
|
} |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue