From ec7afcfee1bca2bc708db8ad002c436b785ea4d8 Mon Sep 17 00:00:00 2001 From: wangqiujuan0808 <578331299@qq.com> Date: Mon, 30 Oct 2023 20:43:10 +0800 Subject: [PATCH] .. --- src/components/Header.vue | 2 +- src/components/Zhibiao.vue | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/Header.vue b/src/components/Header.vue index 271575f..733a333 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -49,7 +49,7 @@ export default { onMounted(() => { const pathname = window.location.hash.split('/')[1] || '' if (!['login'].includes(pathname)) { - getUserInfo() + // getUserInfo() } }) const getUserInfo = async () => { diff --git a/src/components/Zhibiao.vue b/src/components/Zhibiao.vue index f95b9d9..4228d7c 100644 --- a/src/components/Zhibiao.vue +++ b/src/components/Zhibiao.vue @@ -33,6 +33,7 @@ export default { }); const getChartsZfl = (id, text) => { var dom = document.getElementById(id); + console.log(dom); var op = { color: ['#80FFA5', '#00DDFF', '#37A2FF', '#FF0087', '#FFBF00'], title: { @@ -239,6 +240,9 @@ export default { } const getEchart = (dom, op) => { if (dom) { + // 图表的dom属性中发现了一个特殊的属性:_echarts_instance_,对应的值是一个id,可能是由于再次渲染时这个id未发生改变导致ehcarts认为不需要重新渲染 + // 手动移除该属性 + dom.removeAttribute('_echarts_instance_') var myChart = echarts.init(dom); var option = op; @@ -267,7 +271,6 @@ export default { width: 100%; height: 20%; margin: 0 auto; - border: 1px solid red; } }