footer-share.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view class="footer-share-box display-around">
  3. <button class="display-flex-start items-center share-font" :style="{'border-right': isCollection ? '1px solid #d8d8d8' : 'none'}" open-type="share" @click="sharePage()">
  4. <view style="margin-right:15rpx;font-size: 26rpx;">分享</view>
  5. <image src="../../static/share_icon.png" mode="aspectFill" style="width: 30rpx;height: 30rpx;"></image>
  6. </button>
  7. <view class="display-flex-start items-center share-font" v-if='isCollection' @click="collectionPage()">
  8. <view style="margin-right:15rpx;font-size: 26rpx;">收藏</view>
  9. <image src="../../static/collection.png" mode="aspectFill" style="width: 40rpx;height: 40rpx;"></image>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. name:"footer-share",
  16. props:{
  17. isCollection: {
  18. type: Boolean,
  19. default:false
  20. }
  21. },
  22. data() {
  23. return {
  24. };
  25. },
  26. methods:{
  27. sharePage() {
  28. this.$emit('sharePages')
  29. },
  30. collectionPage() {
  31. this.$emit('collectionPages')
  32. },
  33. }
  34. }
  35. </script>
  36. <style>
  37. .footer-share-box {
  38. height: 50rpx;
  39. position: fixed;
  40. bottom: 0;
  41. width: 100%;
  42. border-radius: 10rpx;
  43. box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.1);
  44. padding: 20rpx;
  45. background: #fff;
  46. }
  47. .share-font {
  48. width: 45%;
  49. justify-content: center;
  50. }
  51. .footer-share-box button {
  52. background-color: #fff;
  53. border-radius:0;
  54. }
  55. .footer-share-box button::after{ border: none;}
  56. </style>