feat:完善样式
This commit is contained in:
@@ -88,7 +88,6 @@
|
||||
|
||||
<script setup>
|
||||
import countup from 'vue-countup-v3'
|
||||
import map from '@/assets/images/map-img-1.jpg'
|
||||
|
||||
import pubSub from 'pubsub-js'
|
||||
import { cloneDeep } from 'lodash'
|
||||
@@ -97,15 +96,14 @@
|
||||
let info = ref(null)
|
||||
|
||||
onMounted(() => {
|
||||
hotelChange = PubSub.subscribe('hotelChange', (msg, data) => {
|
||||
hotelChange = pubSub.subscribe('hotelChange', (msg, data) => {
|
||||
let newData = cloneDeep(data)
|
||||
newData.banner = newData.banner ? newData.banner.split(',') : []
|
||||
info.value = newData
|
||||
console.log(info.value, 'info.value')
|
||||
})
|
||||
})
|
||||
onUnmounted(() => {
|
||||
if (hotelChange) PubSub.unsubscribe(hotelChange)
|
||||
if (hotelChange) pubSub.unsubscribe(hotelChange)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -147,7 +147,6 @@
|
||||
if (map.value && modelValue.value) {
|
||||
// 109.645729,31.041203
|
||||
if (carOverlays.value.length > 0) {
|
||||
console.log(11111)
|
||||
// 更新车辆marker位置
|
||||
let flag = false
|
||||
for (let i = 0; i < carOverlays.value.length; i++) {
|
||||
@@ -159,7 +158,7 @@
|
||||
lat: props.carList[j].lat
|
||||
})
|
||||
flag = true
|
||||
break
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,11 +174,14 @@
|
||||
lng: props.carList[i].lng,
|
||||
lat: props.carList[i].lat
|
||||
})
|
||||
currentMarker.value.setPosition({
|
||||
lng: props.carList[i].lng,
|
||||
lat: props.carList[i].lat
|
||||
})
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(2222)
|
||||
props.carList.map((item, i) => {
|
||||
if (item.lng && item.lat) {
|
||||
addMarker(carIcon, [item.lng, item.lat], [36, 50])
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="traffic-map" :class="[routers.length == 0 ? 'traffic-map-big' : 'traffic-map']" />
|
||||
<div id="traffic-map" class="traffic-map-big" :class="{ 'traffic-map': routers.length > 0 }" />
|
||||
|
||||
<div v-if="routers.length > 0" class="list">
|
||||
<div class="item" v-for="(item, index) in routers" :key="index" @click="handleRouter(item)">
|
||||
@@ -183,16 +183,7 @@
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
.traffic-map {
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
width: vw(1500);
|
||||
height: vh(955);
|
||||
margin-left: vw(8);
|
||||
box-sizing: border-box;
|
||||
background-image: url('/src/assets/images/map-bg-2.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.traffic-map-big {
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
@@ -203,6 +194,9 @@
|
||||
background-image: url('/src/assets/images/map-bg-2.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.traffic-map {
|
||||
width: vw(1500) !important;
|
||||
}
|
||||
.video-list {
|
||||
width: vw(320);
|
||||
height: vh(120);
|
||||
|
||||
Reference in New Issue
Block a user