mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-07 03:14:59 +08:00
- 将多个组件转换为 `<script setup>` 语法,提升可读性和性能 - 优化状态管理和事件处理逻辑,简化代码结构 - 更新样式和布局以适应新组件结构 - 添加新功能和修复已知问题,提升用户体验
48 lines
999 B
Vue
48 lines
999 B
Vue
<template>
|
|
<div class="layout">
|
|
<div class="flex-one hot-image">
|
|
<image class="hot-image-main" mode="widthFix" :src="res.list[0].img" alt=""></image>
|
|
|
|
<image
|
|
v-for="(area, index) in res.list[0].zoneInfo"
|
|
:key="index"
|
|
@click="modelNavigateTo(area)"
|
|
mode="widthFix"
|
|
class="hot-area"
|
|
:style="{
|
|
left: area.leftPer * 100 + '%',
|
|
top: area.topPer * 100 + '%',
|
|
width: area.widthPer * 100 + '%',
|
|
height: area.heightPer * 100 + '%',
|
|
}"
|
|
:src="area.img"
|
|
alt=""
|
|
></image>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { modelNavigateTo } from "./tpl";
|
|
|
|
defineProps<{ res: any }>();
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
@import "./tpl.scss";
|
|
.hot-image {
|
|
position: relative;
|
|
}
|
|
.hot-area {
|
|
position: absolute;
|
|
z-index: 99;
|
|
}
|
|
.flex-one {
|
|
width: 100%;
|
|
display: block;
|
|
overflow: hidden;
|
|
}
|
|
.hot-image-main {
|
|
width: 100%;
|
|
min-height: 200rpx;
|
|
}
|
|
</style>
|