uni-share.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <view class='uni-page'>
  3. <u-popup :show="modelshow" @close="close" round="20rpx">
  4. <view class="dis f-c ">
  5. <view class="header dis f-c ">
  6. <image src="/static/image/share.png" mode=""></image>
  7. <view class="dis a-c j-s tab">
  8. <view class="dis f-c a-c" @tap="weixin">
  9. <image src="/static/image/weixin.png" mode=""></image>
  10. <text>微信好友</text>
  11. </view>
  12. <view class="dis f-c a-c" @tap="userSmsShare">
  13. <image src="/static/image/duanxin.png" mode=""></image>
  14. <text>短信</text>
  15. </view>
  16. <view class="dis f-c a-c" @tap="copyLink">
  17. <image src="/static/image/fuzhi.png" mode=""></image>
  18. <text>复制链接</text>
  19. </view>
  20. <!-- <view class="dis f-c a-c" @tap="saveToAlbum">
  21. <image src="/static/image/baocun.png" mode=""></image>
  22. <text>保存到相册</text>
  23. </view> -->
  24. </view>
  25. </view>
  26. <u-gap height="15rpx" bgColor="#F7F7F7"></u-gap>
  27. <view class="btn dis a-c j-c " @tap="closeModal">
  28. <text>取消</text>
  29. </view>
  30. </view>
  31. </u-popup>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. props: {
  37. show: {
  38. type: Boolean,
  39. default: false
  40. },
  41. },
  42. data() {
  43. return {
  44. modelshow: this.show
  45. }
  46. },
  47. onShow() {
  48. },
  49. onLoad() {
  50. },
  51. watch: {
  52. show(newVal) {
  53. this.modelshow = newVal
  54. }
  55. },
  56. methods: {
  57. weixin() {
  58. this.$emit('weixin')
  59. },
  60. userSmsShare() {
  61. this.$emit('userSmsShare')
  62. },
  63. copyLink() {
  64. this.$emit('copyLink')
  65. },
  66. saveToAlbum() {
  67. this.$emit('saveToAlbum')
  68. },
  69. closeModal() {
  70. this.$emit('closeModal')
  71. },
  72. close() {
  73. this.$emit('close')
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. .header {
  80. padding: 40rpx 89rpx 60rpx;
  81. box-sizing: border-box;
  82. >image {
  83. margin: 0 auto;
  84. width: 470rpx;
  85. height: 50rpx;
  86. margin-bottom: 60rpx;
  87. }
  88. .tab {
  89. image {
  90. width: 88rpx;
  91. height: 88rpx;
  92. }
  93. text {
  94. font-size: 24rpx;
  95. color: #333;
  96. margin-top: 10rpx;
  97. }
  98. }
  99. }
  100. .btn {
  101. padding: 24rpx;
  102. box-sizing: border-box;
  103. font-size: 30rpx;
  104. color: #333;
  105. }
  106. </style>