share.vue 645 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <view class="share-btn-box" :style="{padding:padding}">
  3. </view>
  4. </template>
  5. <script>
  6. import CONFIG from "@/config/global.config.js"
  7. export default {
  8. props: {
  9. padding: {
  10. type: String,
  11. default: '20rpx 0'
  12. },
  13. sharePoster: {
  14. type: String,
  15. default: ""
  16. },
  17. taskId: {
  18. type: Number,
  19. default: -1
  20. }
  21. },
  22. data() {
  23. return {
  24. codeurl: null,
  25. }
  26. },
  27. methods: {
  28. onShare() {
  29. this.codeurl = `${CONFIG.hostUrl}?URLType=Task&taskId=${this.taskId}`
  30. this.$refs.sharePosterRef.open();
  31. },
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .share-btn-box {
  37. width: 100%;
  38. }
  39. </style>