417
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
<!-- 拥堵次数占比 -->
|
||||
<template>
|
||||
<div class="jam-count" :id="id" />
|
||||
<div style="position: relative;">
|
||||
<div class="jam-count" :id="id" />
|
||||
<div v-if="condShow==0" class="nYong-du">加载中...</div>
|
||||
<div v-if="condShow==1" class="nYong-du">暂无数据</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -18,12 +23,18 @@
|
||||
|
||||
let params = null
|
||||
const colorList = ['#FDC40A', '#FF5232', '#50F0A6']
|
||||
|
||||
let condShow = ref(0)
|
||||
let aIndex = 1
|
||||
watch(
|
||||
() => props.list,
|
||||
(val) => {
|
||||
aIndex+=1
|
||||
if(aIndex>=3&&!val.length){
|
||||
condShow.value = 1
|
||||
}
|
||||
if (val.length > 0) {
|
||||
setTimeout(() => {
|
||||
condShow.value = 2
|
||||
init()
|
||||
}, 1000)
|
||||
}
|
||||
@@ -127,6 +138,18 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.nYong-du{
|
||||
position:absolute;
|
||||
left:0;
|
||||
top:0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size:vw(18);
|
||||
color:#999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.jam-count {
|
||||
width: vw(250);
|
||||
height: vh(150);
|
||||
|
||||
Reference in New Issue
Block a user