gaoluyang
2026-06-24 712aa51536236d43e87273e4ce45ac5691dffad8
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
<script setup lang="ts">
import type { HotZoneProperty } from './config';
 
import { Image } from 'ant-design-vue';
 
/** 热区 */
defineOptions({ name: 'HotZone' });
 
const props = defineProps<{ property: HotZoneProperty }>();
</script>
 
<template>
  <div class="min-h-30px relative h-full w-full">
    <Image
      :src="props.property.imgUrl"
      class="pointer-events-none h-full w-full select-none"
      :preview="false"
    />
    <div
      v-for="(item, index) in props.property.list"
      :key="index"
      class="absolute z-10 flex cursor-move items-center justify-center border text-sm opacity-80"
      :style="{
        width: `${item.width}px`,
        height: `${item.height}px`,
        top: `${item.top}px`,
        left: `${item.left}px`,
        color: 'hsl(var(--primary))',
        background: 'color-mix(in srgb, hsl(var(--primary)) 30%, transparent)',
        borderColor: 'hsl(var(--primary))',
      }"
    >
      {{ item.name }}
    </div>
  </div>
</template>