2023-12-19 15:10:50 +00:00
|
|
|
|
<!-- 装修图文组件:热区 -->
|
2023-09-04 06:12:16 +00:00
|
|
|
|
<template>
|
|
|
|
|
<view class="hotzone-wrap">
|
2023-12-14 12:22:51 +00:00
|
|
|
|
<image :src="sheep.$url.cdn(data.imgUrl)" style="width: 100%" mode="widthFix"></image>
|
2023-09-04 06:12:16 +00:00
|
|
|
|
<view
|
|
|
|
|
class="hotzone-box"
|
2023-12-14 12:22:51 +00:00
|
|
|
|
v-for="(item, index) in data.list"
|
|
|
|
|
:key="index"
|
2023-09-04 06:12:16 +00:00
|
|
|
|
:style="[
|
|
|
|
|
{
|
2023-12-14 12:22:51 +00:00
|
|
|
|
top: `${item.top}px`,
|
|
|
|
|
left: `${item.left}px`,
|
|
|
|
|
width: `${item.width}px`,
|
|
|
|
|
height: `${item.height}px`,
|
2023-09-04 06:12:16 +00:00
|
|
|
|
},
|
|
|
|
|
]"
|
|
|
|
|
@tap.stop="sheep.$router.go(item.url)"
|
|
|
|
|
>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import sheep from '@/sheep';
|
|
|
|
|
|
|
|
|
|
// 接收参数
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
data: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({}),
|
|
|
|
|
},
|
|
|
|
|
styles: {
|
|
|
|
|
type: Object,
|
|
|
|
|
default: () => ({}),
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.hotzone-wrap {
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
.hotzone-box {
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
</style>
|