417
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
<template>
|
||||
<div
|
||||
:id="id"
|
||||
:style="{
|
||||
width: styleUtil.px2vw(width),
|
||||
height: styleUtil.px2vh(height)
|
||||
}"
|
||||
/>
|
||||
<div style="position: relative;">
|
||||
<div
|
||||
:id="id"
|
||||
:style="{
|
||||
width: styleUtil.px2vw(width),
|
||||
height: styleUtil.px2vh(height)
|
||||
}"
|
||||
/>
|
||||
<div v-if="condShow==0" class="nYong-du">加载中...</div>
|
||||
<div v-if="condShow==1" class="nYong-du">暂无数据</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import styleUtil from '@/utils/styleUtil'
|
||||
@@ -43,7 +48,7 @@
|
||||
|
||||
let timer = null
|
||||
let currentIndex = -1
|
||||
|
||||
let condShow = ref(0)
|
||||
let params = null
|
||||
var defaultColors = ['#06E2FF', '#02FFB8', '#FF465F', '#FFCA36', '#9A4BFC', '#044EFF']
|
||||
const defaultSeriesConfig = (index) => {
|
||||
@@ -162,14 +167,22 @@
|
||||
}
|
||||
setOption(params)
|
||||
}
|
||||
let aIndex = 1
|
||||
watch(
|
||||
[() => props.data, () => props.xAxisData],
|
||||
(val) => {
|
||||
aIndex+=1
|
||||
if(aIndex>=3&&!val[0].length){
|
||||
condShow.value = 1
|
||||
}
|
||||
if (val[0].length > 0 && val[1].length > 0) {
|
||||
condShow.value = 2
|
||||
setTimeout(() => {
|
||||
init()
|
||||
}, 1000)
|
||||
}
|
||||
}else{
|
||||
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
@@ -203,4 +216,17 @@
|
||||
// timer = undefined
|
||||
// }
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
<style 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;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user