share.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <view class="bottom-panel" :class="Visible?'bottom-panel open':'bottom-panel close'" @click="closePopup">
  3. <view class="popup-bg">
  4. <view class="wechat-box">
  5. <image src="/static/share.png" mode="widthFix"></image>
  6. </view>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. /*是否可见*/
  15. Visible: false,
  16. poster_img: '',
  17. /*公众号分享是否显示*/
  18. wechat_share:false
  19. }
  20. },
  21. props: ['isbottmpanel'],
  22. watch: {
  23. 'isbottmpanel': function(n, o) {
  24. if (n != o) {
  25. this.wechat_share=false;
  26. this.Visible = n;
  27. }
  28. }
  29. },
  30. methods: {
  31. /*关闭弹窗*/
  32. closePopup(type) {
  33. this.$emit('close', {
  34. type: type
  35. })
  36. },
  37. }
  38. }
  39. </script>
  40. <style>
  41. .bottom-panel .popup-bg {
  42. position: fixed;
  43. top: 0;
  44. right: 0;
  45. bottom: 0;
  46. left: 0;
  47. background: rgba(0, 0, 0, .6);
  48. z-index: 98;
  49. }
  50. .bottom-panel .popup-bg .wechat-box{ padding-top: var(--window-top);}
  51. .bottom-panel .popup-bg .wechat-box image{ width: 100%;}
  52. .bottom-panel .content {
  53. position: fixed;
  54. width: 100%;
  55. bottom: 0;
  56. min-height: 200rpx;
  57. max-height: 900rpx;
  58. background-color: #fff;
  59. transform: translate3d(0, 980rpx, 0);
  60. transition: transform .2s cubic-bezier(0, 0, .25, 1);
  61. bottom: env(safe-area-inset-bottom);
  62. z-index: 99;
  63. }
  64. .bottom-panel.open .content {
  65. transform: translate3d(0, 0, 0);
  66. }
  67. .bottom-panel.close .popup-bg {
  68. display: none;
  69. }
  70. .module-share .hd {
  71. height: 90rpx;
  72. line-height: 90rpx;
  73. font-size: 36rpx;
  74. }
  75. .module-share .item button,.module-share .item button::after{ background: none; border: none;}
  76. .module-share .icon-box {
  77. width: 100rpx;
  78. height: 100rpx;
  79. border-radius: 50%;
  80. background: #f6bd1d;
  81. }
  82. .module-share .icon-box .iconfont {
  83. font-size: 60rpx;
  84. color: #FFFFFF;
  85. }
  86. .module-share .btns {
  87. margin-top: 30rpx;
  88. }
  89. .module-share .btns button {
  90. height: 90rpx;
  91. line-height: 90rpx;
  92. border-radius: 0;
  93. border-top: 1px solid #EEEEEE;
  94. }
  95. .module-share .btns button::after {
  96. border-radius: 0;
  97. }
  98. .module-share .share-friend {
  99. background: #04BE01;
  100. }
  101. </style>