sharePoster.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view class="share-poster-wrap">
  3. <image @click="handleCreatePoster" :style="style" class="share-icon" src="@/static/share-poster-icon.png" mode="aspectFill"/>
  4. <van-popup :show="show" @close="show=false" :close-on-click-overlay="false">
  5. <view class="loading-box" v-if="!posterImg">
  6. <image class="load-img" src="../../static/loading.png" mode="aspectFill" />
  7. <view>加载中...</view>
  8. </view>
  9. </van-popup>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. // shareData.type 分享页面: chartList(图列表), reportList(报告列表), specialColumnList(专栏列表),
  15. props:{
  16. style:null,
  17. shareData:null,
  18. },
  19. data () {
  20. return {
  21. loading:false,
  22. show:false,
  23. posterImg:''
  24. }
  25. },
  26. methods: {
  27. handleCreatePoster(){
  28. this.show=true
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. .share-poster-wrap{
  35. .share-icon{
  36. position: fixed;
  37. bottom: 100rpx;
  38. right: 34rpx;
  39. z-index: 50;
  40. width: 76rpx;
  41. height: 76rpx;
  42. }
  43. .loading-box{
  44. width: 417rpx;
  45. height: 261rpx;
  46. text-align: center;
  47. padding-top: 80rpx;
  48. font-size: 32rpx;
  49. font-weight: bold;
  50. .load-img{
  51. width: 91rpx;
  52. height: 91rpx;
  53. animation: circle 1s linear infinite;
  54. }
  55. @keyframes circle {
  56. 0%{
  57. transform: rotateZ(0);
  58. }
  59. 100%{
  60. transform: rotateZ(360deg);
  61. }
  62. }
  63. }
  64. }
  65. </style>