add
This commit is contained in:
parent
2fc5db6a7b
commit
f56466c7f9
@ -12,7 +12,7 @@
|
|||||||
<div class="w-[40px] h-[40px] duration-300 mt-[5px] mb-[2px] !bg-[length:100%_100%]"
|
<div class="w-[40px] h-[40px] duration-300 mt-[5px] mb-[2px] !bg-[length:100%_100%]"
|
||||||
:style="menuName == item.name ? { background: `url(${getImgById(item.id)?.img})` } : { background: `url(${getImgById(item.id)?.actImg})` }">
|
:style="menuName == item.name ? { background: `url(${getImgById(item.id)?.img})` } : { background: `url(${getImgById(item.id)?.actImg})` }">
|
||||||
</div>
|
</div>
|
||||||
<span :class="menuName == item.name ? 'text-primary' : ''"> {{ item.name }}</span>
|
<span :style="menuName == item.name ? { color: getImgById(item.id)?.color } : ''"> {{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -50,30 +50,30 @@ useWatchRoute((route) => {
|
|||||||
|
|
||||||
const getImgById = (id: number) => {
|
const getImgById = (id: number) => {
|
||||||
if (id == 173) {
|
if (id == 173) {
|
||||||
return { img: '/index/XTACT.png', actImg: "/index/XT.png" }
|
return { img: '/index/XTACT.png', actImg: "/index/XT.png", color: '#8FC814' }
|
||||||
}
|
}
|
||||||
else if (id == 174) {
|
else if (id == 174) {
|
||||||
return { img: '/index/SGGLACT.png', actImg: "/index/SGGL.png" }
|
return { img: '/index/SGGLACT.png', actImg: "/index/SGGL.png", color: '#4073FA' }
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (id == 1046) {
|
else if (id == 1046) {
|
||||||
return { img: '/index/ZJZXACT.png', actImg: "/index/ZJZX.png" }
|
return { img: '/index/ZJZXACT.png', actImg: "/index/ZJZX.png", color: '#F8BC23' }
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (id == 1117) {
|
else if (id == 1117) {
|
||||||
return { img: '/index/GCJLACT.png', actImg: "/index/GCJL.png" }
|
return { img: '/index/GCJLACT.png', actImg: "/index/GCJL.png", color: '#336DE8' }
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (id == 1399) {
|
else if (id == 1399) {
|
||||||
return { img: '/index/XMGLACT.png', actImg: "/index/XMGL.png" }
|
return { img: '/index/XMGLACT.png', actImg: "/index/XMGL.png", color: '#FF820C' }
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (id == 1436) {
|
else if (id == 1436) {
|
||||||
return { img: '/index/XMZXACT.png', actImg: "/index/XMZX.png" }
|
return { img: '/index/XMZXACT.png', actImg: "/index/XMZX.png", color: '#8FC814' }
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (id == 1548) {
|
else if (id == 1548) {
|
||||||
return { img: '/index/CWGLACT.png', actImg: "/index/CWGL.png" }
|
return { img: '/index/CWGLACT.png', actImg: "/index/CWGL.png", color: '#F7BB20' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
x
Reference in New Issue
Block a user