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
| <template>
| <div class="layout">
| <div class="flex-one hot-image">
| <image 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>
| import { modelNavigateTo } from "./tpl";
|
| export default {
| title: "热区模块",
| data() {
| return {
| modelNavigateTo,
| };
| },
| props: ["res"],
| };
| </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;
| image {
| width: 100%;
|
| min-height: 200rpx;
| // height: 100%;
| }
| }
| </style>
|
|