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