提交 | 用户 | 时间
|
820397
|
1 |
<template> |
H |
2 |
<div class="relative h-full min-h-30px w-full"> |
|
3 |
<el-image :src="property.imgUrl" class="pointer-events-none h-full w-full select-none" /> |
|
4 |
<div |
|
5 |
v-for="(item, index) in property.list" |
|
6 |
:key="index" |
|
7 |
class="hot-zone" |
|
8 |
:style="{ |
|
9 |
width: `${item.width}px`, |
|
10 |
height: `${item.height}px`, |
|
11 |
top: `${item.top}px`, |
|
12 |
left: `${item.left}px` |
|
13 |
}" |
|
14 |
> |
|
15 |
{{ item.name }} |
|
16 |
</div> |
|
17 |
</div> |
|
18 |
</template> |
|
19 |
|
|
20 |
<script setup lang="ts"> |
|
21 |
import { HotZoneProperty } from './config' |
|
22 |
|
|
23 |
/** 热区 */ |
|
24 |
defineOptions({ name: 'HotZone' }) |
|
25 |
const props = defineProps<{ property: HotZoneProperty }>() |
|
26 |
</script> |
|
27 |
|
|
28 |
<style scoped lang="scss"> |
|
29 |
.hot-zone { |
|
30 |
position: absolute; |
|
31 |
background: var(--el-color-primary-light-7); |
|
32 |
opacity: 0.8; |
|
33 |
border: 1px solid var(--el-color-primary); |
|
34 |
color: var(--el-color-primary); |
|
35 |
font-size: 14px; |
|
36 |
display: flex; |
|
37 |
align-items: center; |
|
38 |
justify-content: center; |
|
39 |
cursor: move; |
|
40 |
z-index: 10; |
|
41 |
} |
|
42 |
</style> |