map.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div class="mbmap">
  3. <div class="mapshow cadmap" @click="onClickMap" v-if="isShow">
  4. <div class="close" @click.stop="isShow = false">
  5. <img :src="require(`@/assets/images/proj2022/mobile/cancel@2x.png`)" alt="" />
  6. </div>
  7. <div class="mapbig" :style="{ backgroundImage: `url(${require(`@/assets/images/proj2022/ditu.png`)})` }" ></div>
  8. </div>
  9. <div class="mapthumb" @click="isShow = true" v-else>
  10. <img :src="require(`@/assets/images/proj2022/mobile/map@2x.png`)" alt="" />
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. isShow: true,
  19. };
  20. },
  21. methods: {
  22. onClickMap() {
  23. window.player.director.changeMode("floorplan");
  24. },
  25. },
  26. };
  27. </script>
  28. <style lang="less" scoped>
  29. .mbmap {
  30. position: fixed;
  31. right: 10px;
  32. top: 8px;
  33. overflow: hidden;
  34. z-index: 999;
  35. .mapshow {
  36. width: 166px;
  37. height: 120px;
  38. background: rgba(0, 0, 0, 0.2);
  39. border-radius: 1px;
  40. backdrop-filter: blur(50px);
  41. padding: 8px;
  42. .close {
  43. z-index: 99;
  44. position: absolute;
  45. background-color: rgba(0, 0, 0, 0.4);
  46. border-radius: 50%;
  47. cursor: pointer;
  48. height: 60px;
  49. overflow: hidden;
  50. position: absolute;
  51. right: -30px;
  52. top: -30px;
  53. width: 60px;
  54. > img {
  55. position: absolute;
  56. bottom: 12px;
  57. left: 12px;
  58. width: 12px;
  59. }
  60. }
  61. .mapbig {
  62. width: 100%;
  63. height: 100%;
  64. background-size: auto 116%;
  65. background-repeat: no-repeat;
  66. background-position: center center;
  67. background-color: rgba(0, 0, 0, 0.2);
  68. }
  69. }
  70. .mapthumb {
  71. width: 44px;
  72. height: 44px;
  73. .cad{
  74. visibility: hidden;
  75. }
  76. > img {
  77. width: 100%;
  78. height: 100%;
  79. }
  80. }
  81. }
  82. </style>