4.22
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">{{text}}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -33,16 +38,26 @@
|
||||
subTitle: {
|
||||
type: [String, Number],
|
||||
default: () => ''
|
||||
}
|
||||
},
|
||||
text:{
|
||||
type: String,
|
||||
default: '暂无数据'
|
||||
}
|
||||
})
|
||||
|
||||
const { id, setOption } = useEchart()
|
||||
|
||||
let condShow = ref(0)
|
||||
let aIndex = 1
|
||||
watch(
|
||||
() => props.list,
|
||||
() => {
|
||||
(val) => {
|
||||
aIndex+=1
|
||||
if(aIndex>=3&&!val.length){
|
||||
condShow.value = 1
|
||||
}
|
||||
if (props.list.length > 0) {
|
||||
setTimeout(() => {
|
||||
condShow.value = 2
|
||||
init()
|
||||
}, 1000)
|
||||
}
|
||||
@@ -139,4 +154,19 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
<style scoped lang="scss">
|
||||
|
||||
.nYong-du{
|
||||
position:absolute;
|
||||
left:0;
|
||||
top:0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size:vw(18);
|
||||
// color:#999;
|
||||
color:#02f9fa;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user