邓洁: echarts的loading

This commit is contained in:
邓洁
2024-01-03 14:50:59 +08:00
parent 073ec5c570
commit 2d1d42f83a
6 changed files with 88 additions and 14 deletions

View File

@@ -38,7 +38,11 @@
<div class="value">345v</div>
</div>
</div>
<div class="chat-dialog">
<div class="loading-block" v-if="showLoading">
<div class="loading" ></div>
<span>加载中...</span>
</div>
<div class="chat-dialog" v-else>
<div id="containerEle"></div>
<div style="width: 1px;"></div>
</div>
@@ -58,6 +62,7 @@ const props = defineProps({
});
let myEcharts = reactive({});
const isVisited = ref(false);
const showLoading = ref(false)
const eleData = ref([])
const electricityConsumptionMonthly = ref(0)
const monthlySavings = ref(4000)
@@ -121,6 +126,7 @@ const getBasicData = (data) => {
const handleOpenChart = () => {
console.log('用电量弹窗')
isVisited.value = true
// showLoading.value=true
nextTick(() => {
initChart()
})