map.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <div class="mbmap">
  3. <div class="cadmap mapshow" :class="isShow?'':'maphide'" @click="onClickMap">
  4. <div class="close" @click.stop="isShow = !isShow">
  5. <div class="cline"></div>
  6. <img :src="require(`@/assets/images/proj2022/icon/back.png`)" alt="" />
  7. </div>
  8. <div class="mapbig" :style="{ backgroundImage: `url(${require(`@/assets/images/proj2022/ditu_m.png`)})` }" ></div>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. export default {
  14. data() {
  15. return {
  16. isShow: true,
  17. };
  18. },
  19. methods: {
  20. onClickMap() {
  21. window.player.director.changeMode("floorplan");
  22. },
  23. },
  24. };
  25. </script>
  26. <style lang="less" scoped>
  27. .mbmap {
  28. position: fixed;
  29. right: 0;
  30. top: 0;
  31. z-index: 999;
  32. .mapshow {
  33. width: 186px;
  34. height: 120px;
  35. background: rgba(0, 0, 0, 0.2);
  36. border-radius: 1px;
  37. backdrop-filter: blur(50px);
  38. padding: 8px;
  39. transition: .3s transform ease;
  40. .close {
  41. z-index: 99;
  42. position: absolute;
  43. background-color: rgba(0, 0, 0, 0.2);
  44. backdrop-filter: blur(50px);
  45. cursor: pointer;
  46. overflow: hidden;
  47. position: absolute;
  48. left: -20px;
  49. top: 0;
  50. width: 20px;
  51. display: flex;
  52. justify-content: center;
  53. align-items: center;
  54. height: 30px;
  55. >div{
  56. height: 100%;
  57. width: 2px;
  58. background: #6EAFEC;
  59. }
  60. > img {
  61. width: 8px;
  62. margin-left: 4px;
  63. }
  64. }
  65. .mapbig {
  66. width: 100%;
  67. height: 100%;
  68. background-size: auto 100%;
  69. background-repeat: no-repeat;
  70. background-position: center center;
  71. background-color: rgba(0, 0, 0, 0.2);
  72. }
  73. }
  74. .maphide {
  75. transform: translateX(186px);
  76. .close {
  77. > img {
  78. width: 8px;
  79. margin-left: 4px;
  80. transform: rotate(180deg);
  81. }
  82. }
  83. }
  84. }
  85. </style>