wupengfei
8 天以前 8e99c3b1e12340c27ef71a3a3b0e7c93ae7f8464
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<template>
  <div class="data-board-center-map-mark">
    <div class="data-board-center-map-mark-item init" v-if="!innerChoose">
      <img :src="DataBoardMapInit" alt="" />
    </div>
    <div class="data-board-center-map-mark-item choose" v-else>
      <div class="data-board-center-map-mark-item-park">{{ parkName }}</div>
      <img :src="DataBoardMapChoose" alt="" />
    </div>
  </div>
</template>
 
<script setup lang="ts">
import DataBoardMapInit from '@/assets/dataBoard/data-board-map-init.png';
import DataBoardMapChoose from '@/assets/dataBoard/data-board-map-choose.png';
 
defineOptions({
  name: 'DataBoardCenterMapMark',
});
 
type Props = {
  choose: boolean;
  parkName: string;
};
 
const props = withDefaults(defineProps<Props>(), {
  choose: false,
});
 
const emit = defineEmits<{
  (e: 'update:choose', value: Props['choose']): void;
}>();
 
const innerChoose = computed({
  get() {
    return props.choose;
  },
  set(val) {
    emit('update:choose', val);
  },
});
</script>
 
<style lang="scss" scoped>
@use '@/style/common.scss' as *;
 
.data-board-center-map-mark {
  .data-board-center-map-mark-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 154px;
    height: 104px;
 
    &.init {
      img {
        width: 88px;
        height: 72px;
      }
    }
 
    &.choose {
      position: relative;
 
      img {
        width: 100%;
        height: 100%;
      }
 
      .data-board-center-map-mark-item-park {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        font-size: 24px;
        line-height: 50px;
        font-family: YouSheBiaoTiHei Regular;
        text-align: center;
        color: #ffffff;
      }
    }
  }
}
</style>