Hotspot.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <div class="hotspot animation--hack-browser-bug--stack-too-high" >
  3. <div class="content">
  4. <img class="bg" :src="popImg" alt="">
  5. <div class="info">
  6. <div class="info-top">
  7. <SquareWord direction="column" :word="store.currentHotspot.name" size="mini" />
  8. <div class="desc">
  9. <p v-for="item in store.currentHotspot.info.introduce" :key="item">{{ item }}</p>
  10. </div>
  11. </div>
  12. <div class="info-btm">
  13. <img :src="store.currentHotspot.info.img" alt="">
  14. </div>
  15. </div>
  16. <img class="close" @click="$emit('close')" :src="closeImg" alt="">
  17. </div>
  18. </div>
  19. </template>
  20. <script setup>
  21. import SquareWord from "@/components/SquareWord.vue";
  22. import appStore from "@/store/index";
  23. const store = appStore();
  24. const popImg = utils.getImageUrl(`pop.png`)
  25. const closeImg = utils.getImageUrl(`icon_cancel.png`)
  26. const tempImg = utils.getImageUrl(`zhanwei.jpg`)
  27. </script>
  28. <style lang="scss" scoped>
  29. .hotspot {
  30. position: fixed;
  31. top: 0;
  32. z-index: 9999;
  33. left: 0;
  34. bottom: 0;
  35. right: 0;
  36. width: 100%;
  37. height: 100%;
  38. backdrop-filter: blur(20px);
  39. background-color: rgba(236, 222, 193, 0.9);
  40. .content {
  41. position: absolute;
  42. left: 50%;
  43. top: 50%;
  44. transform: translate(-50%, -50%);
  45. width: 36%;
  46. .bg {
  47. width: 100%;
  48. }
  49. .close {
  50. position: absolute;
  51. right: 2rem;
  52. top: 2rem;
  53. z-index: 99;
  54. cursor: pointer;
  55. width: 1.8rem;
  56. }
  57. .info {
  58. $pading: 3rem;
  59. position: absolute;
  60. top: $pading;
  61. left: $pading * 1.5;
  62. bottom: $pading;
  63. right: $pading * 1.5;
  64. .info-top {
  65. display: flex;
  66. height: 55%;
  67. .desc {
  68. margin-left: 3rem;
  69. margin-top: 3rem;
  70. padding-right: 1rem;
  71. text-indent: 1.76rem;
  72. color: #695757;
  73. font-size: 0.88rem;
  74. line-height: 1.5;
  75. overflow-y: auto;
  76. overflow-x: hidden;
  77. }
  78. }
  79. .info-btm {
  80. margin-top: 2rem;
  81. width: 100%;
  82. height: 40%;
  83. >img {
  84. width: 100%;
  85. height: 100%;
  86. object-fit: cover;
  87. }
  88. }
  89. }
  90. }
  91. }
  92. </style>