icon-light.vue 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <div class="icon-light">
  3. <div class="icon-point" v-for="(item, index) in pointList" :key="index"
  4. :style="{ left: item.leftV, top: item.topV }">
  5. <img :src="item.imgSrc" alt="">
  6. <span :style="{ color: item.textColor }">{{ item.label }}</span>
  7. </div>
  8. </div>
  9. </template>
  10. <script setup lang="ts">
  11. import { ref, reactive } from 'vue'
  12. import { getAssetURL } from '/@/utils/ui';
  13. let pointList = reactive<any[]>([
  14. { imgSrc: getAssetURL('company/unselect-bg.png'), label: '柳塔矿', leftV: '327px', topV: '40px', textColor: '#fff' },
  15. { imgSrc: getAssetURL('company/unselect-bg.png'), label: '寸草塔二矿', leftV: '291px', topV: '69px', textColor: '#fff' },
  16. { imgSrc: getAssetURL('company/select-bg.png'), label: '布尔台矿', leftV: '286px', topV: '97px', textColor: 'rgba(255, 231, 83,.9)' },
  17. { imgSrc: getAssetURL('company/unselect-bg.png'), label: '乌兰木伦矿', leftV: '327px', topV: '115px', textColor: '#fff' },
  18. { imgSrc: getAssetURL('company/select-bg.png'), label: '寸草塔矿', leftV: '346px', topV: '132px', textColor: 'rgba(255, 231, 83,.9)' },
  19. { imgSrc: getAssetURL('company/unselect-bg.png'), label: '石坎台矿', leftV: '373px', topV: '149px', textColor: '#fff' },
  20. { imgSrc: getAssetURL('company/select-bg.png'), label: '补连塔矿', leftV: '408px', topV: '184px', textColor: 'rgba(255, 231, 83,.9)' },
  21. { imgSrc: getAssetURL('company/unselect-bg.png'), label: '哈拉沟矿', leftV: '445px', topV: '214px', textColor: '#fff' },
  22. { imgSrc: getAssetURL('company/select-bg.png'), label: '上湾矿', leftV: '439px', topV: '244px', textColor: 'rgba(255, 231, 83,.9)' },
  23. { imgSrc: getAssetURL('company/unselect-bg.png'), label: '活鸡兔井', leftV: '398px', topV: '265px', textColor: '#fff' },
  24. { imgSrc: getAssetURL('company/unselect-bg.png'), label: '大柳塔矿', leftV: '492px', topV: '260px', textColor: '#fff' },
  25. { imgSrc: getAssetURL('company/select-bg.png'), label: '锦界矿', leftV: '565px', topV: '413px', textColor: 'rgba(255, 231, 83,.9)' },
  26. { imgSrc: getAssetURL('company/unselect-bg.png'), label: '榆家梁矿', leftV: '669px', topV: '308px', textColor: '#fff' },
  27. { imgSrc: getAssetURL('company/select-bg.png'), label: '宝德矿', leftV: '862px', topV: '340px', textColor: 'rgba(255, 231, 83,.9)' },
  28. ])
  29. </script>
  30. <style lang="less" scoped>
  31. .icon-light {
  32. position: relative;
  33. width: 100%;
  34. height: 100%;
  35. .icon-point {
  36. display: flex;
  37. align-items: center;
  38. position: absolute;
  39. img {
  40. width: 35px;
  41. height: 35px;
  42. cursor: pointer;
  43. }
  44. span {
  45. font-size: 12px;
  46. padding: 0px 5px;
  47. background-color: rgba(12, 13, 13);
  48. }
  49. }
  50. }
  51. </style>