app-hotspot.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. import appJumpButton from "../../basic-component/app-jump-button/app-jump-button.vue";
  10. export default {
  11. name: "app-hotspot",
  12. components: {
  13. appJumpButton,
  14. },
  15. props: {
  16. hotspot: {
  17. type: Object,
  18. default() {
  19. return {};
  20. }
  21. }
  22. },
  23. data() {
  24. return {}
  25. },
  26. onLoad() {
  27. },
  28. computed: {
  29. aa() {
  30. if (this.hotspot) {
  31. return `left:${this.hotspot.left}rpx;top:${this.hotspot.top}rpx;width:${this.hotspot.width}rpx;height:${this.hotspot.height}rpx;`;
  32. } else {
  33. return ``;
  34. }
  35. }
  36. }
  37. };
  38. </script>
  39. <style lang="scss" scoped>
  40. .app-hotspot {
  41. position: absolute;
  42. z-index: 1000;
  43. }
  44. </style>