index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="birdview">
  3. <ViewOperation>
  4. <div class="birdcon">
  5. <img class="bd_bg" :src="require(`@/assets/images/proj2022/pc/birdviewbg.jpg`)" alt="" />
  6. <div class="tag" v-for="(item, i) in themes" :key="i" :class="item.id">
  7. <img @click="onClick(item)" :src="require(`@/assets/images/proj2022/bird_view/${item.id}.png`)" alt="" />
  8. </div>
  9. </div>
  10. </ViewOperation>
  11. <img v-if="!hideClose" class="close" @click="close" :src="require('@/assets/images/proj2022/pc/cancel.png')" alt="" />
  12. </div>
  13. </template>
  14. <script>
  15. import ViewOperation from "./ViewOperation";
  16. export default {
  17. props: ["hideClose"],
  18. data() {
  19. return {};
  20. },
  21. components: {
  22. ViewOperation,
  23. },
  24. methods: {
  25. close() {
  26. this.$emit("close");
  27. },
  28. onClick(data) {
  29. console.log(data);
  30. this.$router.push({
  31. name: "scene",
  32. params: { type: data.id, isjump: "yes" },
  33. });
  34. setTimeout(() => {
  35. this.close();
  36. }, 300);
  37. },
  38. },
  39. mounted() {},
  40. };
  41. </script>
  42. <style lang="less" scoped>
  43. .birdview {
  44. position: fixed;
  45. left: 0;
  46. top: 0;
  47. width: 100%;
  48. height: 100%;
  49. z-index: 9;
  50. .close {
  51. position: absolute;
  52. right: 20px;
  53. top: 20px;
  54. cursor: pointer;
  55. z-index: 99;
  56. }
  57. .birdcon {
  58. height: 100%;
  59. width: auto;
  60. position: relative;
  61. .bd_bg {
  62. width: auto;
  63. height: 100%;
  64. }
  65. .tag {
  66. position: absolute;
  67. max-width: 10%;
  68. cursor: pointer;
  69. display: inline-block;
  70. &::after {
  71. pointer-events: none;
  72. animation: highlight-move 3s infinite;
  73. background: linear-gradient(90deg, hsla(0, 0%, 100%, 0) 0, hsla(0, 0%, 100%, 0.3) 50%, hsla(0, 0%, 100%, 0));
  74. content: "";
  75. height: 88%;
  76. left: 0%;
  77. position: absolute;
  78. top: 0;
  79. transform: skewX(-45deg);
  80. width: 40%;
  81. }
  82. > img {
  83. width: 100%;
  84. }
  85. }
  86. .one {
  87. top: 49%;
  88. left: 49%;
  89. }
  90. .two {
  91. top: 41%;
  92. left: 55%;
  93. }
  94. .three {
  95. top: 35%;
  96. left: 62%;
  97. }
  98. .four {
  99. top: 18%;
  100. left: 47%;
  101. }
  102. .five {
  103. top: 26%;
  104. left: 37%;
  105. }
  106. .xuting {
  107. top: 54%;
  108. left: 38%;
  109. }
  110. .weiting {
  111. top: 35%;
  112. left: 30%;
  113. }
  114. }
  115. }
  116. @keyframes highlight-move {
  117. 0% {
  118. left: 0%;
  119. }
  120. 100% {
  121. left: 70%;
  122. }
  123. }
  124. </style>