app-hotspot.vue 1013 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <view class="app-hotspot" :style="aa">
  3. <app-jump-button :open_type="hotspot.link.openType" :url="hotspot.link.url" :params="hotspot.link.params">
  4. <slot></slot>
  5. </app-jump-button>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. name: "app-hotspot",
  11. props: {
  12. hotspot: {
  13. type: Object,
  14. default() {
  15. return {};
  16. }
  17. }
  18. },
  19. data() {
  20. return {}
  21. },
  22. onLoad() {
  23. },
  24. computed: {
  25. aa() {
  26. if (this.hotspot) {
  27. return `left:${this.hotspot.left}rpx;top:${this.hotspot.top}rpx;width:${this.hotspot.width}rpx;height:${this.hotspot.height}rpx;`;
  28. } else {
  29. return ``;
  30. }
  31. }
  32. }
  33. };
  34. </script>
  35. <style lang="scss" scoped>
  36. .app-hotspot {
  37. position: absolute;
  38. z-index: 1000;
  39. }
  40. </style>