@ -3,7 +3,7 @@
< img src = "@/assets/images/home/bus_tip.svg" alt = "" / >
< h4 > { { switchLanguage ( busTip , 'title' ) } } < / h4 >
< div class = "bus-to-right" >
< img ref = "busRefToRight" class = "bus" src = "@/assets/images/home/busToRight.svg" alt = "" / >
< div ref = "busRefToRight" class = "bus" > < / div >
< img class = "line" src = "@/assets/images/home/lineToRight.svg" alt = "" / >
< div class = "name-container" >
< span v-for ="(item, index) in nameList" :key="index" :class="{ active: index === currentIndexToRight }" > {{
@ -12,7 +12,7 @@
< / div >
< / div >
< div class = "bus-to-left" >
< img ref = "busRefToLeft" class = "bus" src = "@/assets/images/home/busToLeft.svg" alt = "" / >
< div ref = "busRefToLeft" class = "bus" > < / div >
< img class = "line" src = "@/assets/images/home/lineToLeft.svg" alt = "" / >
< div class = "name-container" >
< span v-for ="(item, index) in nameList" :key="index" :class="{ active: index === currentIndexToLeft }" > {{
@ -90,8 +90,8 @@ function setBusPositionToLeft(val: number) {
}
}
onMounted ( ( ) => {
setBusPositionToLeft ( 0 )
setBusPositionToRight ( 3 )
setBusPositionToLeft ( 1 )
setBusPositionToRight ( 2 )
} )
< / script >
@ -152,12 +152,35 @@ onMounted(() => {
}
. bus {
top : 85 px ;
background - image : url ( '@/assets/images/home/busToLeft.svg' ) ;
& : : after {
position : absolute ;
top : - 35 px ;
left : 20 px ;
z - index : 3 ;
}
}
}
. bus {
position : absolute ;
top : 0 ;
left : 0 ;
display : block ;
background - image : url ( '@/assets/images/home/busToRight.svg' ) ;
width : 54 px ;
height : 21 px ;
& : : after {
position : absolute ;
top : 37 px ;
left : 20 px ;
z - index : 3 ;
display : block ;
width : 22 px ;
height : 22 px ;
background : url ( '@/assets/images/home/point.svg' ) ;
content : '' ;
}
}
. line {
position : absolute ;
@ -186,18 +209,6 @@ onMounted(() => {
position : relative ;
/ / f o n t - s i z e : 2 4 p x ;
/ / c o l o r : r g b ( 0 0 0 / 9 0 % ) ;
& : : after {
position : absolute ;
top : - 33 px ;
right : 0 ;
left : 0 ;
width : 22 px ;
height : 22 px ;
margin : auto ;
background : url ( '@/assets/images/home/point.svg' ) ;
content : '' ;
}
}
}
}