en-popup.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <view >
  3. <uni-popup ref="popup" @change="setTabBar" type="bottom" :mask-background-color="maskBackgroundColor">
  4. <view class="popup-box" v-show="showTop">
  5. <view class="popup-title" @click="close">
  6. <image class="popup-close" src="@/static/img/pay/gb-p.png"></image>
  7. </view>
  8. <slot name="popupInfo"></slot>
  9. </view>
  10. </uni-popup>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. name: "en-popup",
  16. components: {},
  17. props: {
  18. showTop:{
  19. type:Boolean,
  20. default:true
  21. },
  22. maskBackgroundColor:{
  23. default: 'rgba(0,0,0,0.4)'
  24. }
  25. },
  26. data() {
  27. return {}
  28. },
  29. watch: {},
  30. mounted() {
  31. },
  32. methods: {
  33. open(){
  34. this.$refs.popup.open('bottom')
  35. },
  36. setTabBar(e){
  37. if(e.show){
  38. uni.hideTabBar()
  39. }else {
  40. uni.showTabBar()
  41. }
  42. },
  43. close(){
  44. this.$refs.popup.close()
  45. }
  46. }
  47. }
  48. </script>
  49. <style scoped lang="scss">
  50. .popup-box{
  51. background: #FFFFFF;
  52. border-radius: 20rpx 20rpx 0 0;
  53. box-shadow: 0px -8px 20px 0px rgba(0,0,0,0.04);
  54. padding: 28rpx 32rpx 50rpx 32rpx;
  55. z-index: 100;
  56. .popup-title{
  57. padding: 20rpx;
  58. .popup-close{
  59. margin: 0 auto;
  60. width: 82rpx;
  61. height: 10rpx;
  62. }
  63. }
  64. }
  65. </style>