fix:修改路径图背景显示问题

This commit is contained in:
wyx
2023-03-03 11:34:19 +08:00
parent 98cded07a1
commit a7305abfe1

View File

@@ -6,7 +6,7 @@
background:`url('${imgAttr.backurl}') no-repeat`,
backgroundSize: 'contain'
}">
<div v-for="(item,i) in detail.chapterDtoList" :key="i" class="cha"
<div v-if="detail.chapterDtoList" v-for="(item,i) in detail.chapterDtoList.slice(0,8)" :key="i" class="cha"
:style="{top:`${imgAttr.positions[i]?.top - (current===i?5:0)}px`,left:`${imgAttr.positions[i]?.left - (current===i?10:0)}px`}">
<div @click="toDetail(i)"
class="nameClass"
@@ -15,7 +15,7 @@
background: `url('${current===i?imgAttr.currentBack:imgAttr.nameBack}')`,
backgroundSize:'100%',
width:`${current===i?107:93}px`,
height:`${current===i?80:70}px`,
height:`${current===i?imgAttr.cheightC:imgAttr.cheight}px`,
lineHeight:'50px',color: current===i?'#FFF':'#A06438'}">
{{ item.name }}
</div>
@@ -49,6 +49,8 @@ const imageAttrs = {
'路径图背景': {
width: 1437,
height: 594,
cheight:70,
cheightC:80,
backurl: back,
currentBack: currentBack,
nameBack: nameBack,
@@ -66,23 +68,27 @@ const imageAttrs = {
'路径图2': {
width: 1437,
height: 594,
cheight:100,
cheightC:106,
backurl: back2,
currentBack: currentBack2,
nameBack: nameBack2,
positions: [
{left: 40, top: 380},
{left: 160, top: 300},
{left: 330, top: 280},
{left: 160, top: 290},
{left: 330, top: 270},
{left: 440, top: 200},
{left: 610, top: 175},
{left: 610, top: 170},
{left: 780, top: 130},
{left: 890, top: 60},
{left: 1060, top: 45},
{left: 1060, top: 30},
]
},
'路径图3': {
width: 1437,
height: 594,
cheight:70,
cheightC:80,
backurl: back1,
currentBack: currentBack1,
nameBack: nameBack1,