From 4300e2394a205f3afbf4a3528db851e5636041d9 Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期五, 19 七月 2024 14:24:25 +0800 Subject: [PATCH] fix: 修改页面路径 --- customer_list/ch/ai_html/views/demo/html/MonthlyLeaderBoard.html | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/customer_list/ch/ai_html/views/demo/html/MonthlyLeaderBoard.html b/customer_list/ch/ai_html/views/demo/html/MonthlyLeaderBoard.html index 6c66724..b360350 100644 --- a/customer_list/ch/ai_html/views/demo/html/MonthlyLeaderBoard.html +++ b/customer_list/ch/ai_html/views/demo/html/MonthlyLeaderBoard.html @@ -73,6 +73,8 @@ </body> <script> const { createApp, onMounted, ref, reactive } = Vue; + const leaderChartDomRef = ref(null); + const leaderBarChartDomRef = ref(null); const App = createApp({ setup() { let state = reactive({ @@ -118,6 +120,7 @@ const initLeaderBoardChart = () => { var chartDom = document.getElementById('leaderChart'); var leaderChartDom = echarts.init(chartDom); + leaderChartDomRef.value = leaderChartDom; var option = { title: { text: '杩�12鏈堢即璐归噾棰�', @@ -149,6 +152,7 @@ const barXData = state.leaderBoardList.map((item) => item.Name); var chartDom = document.getElementById('leaderBarChart'); var leaderBarChartDom = echarts.init(chartDom); + leaderBarChartDomRef.value = leaderBarChartDom; var option = { xAxis: { type: 'category', @@ -176,6 +180,10 @@ option && leaderBarChartDom.setOption(option); }; onMounted(() => { + window.parent.addEventListener('resize', () => { + leaderChartDomRef.value.resize(); + leaderBarChartDomRef.value.resize(); + }); initLeaderBoardChart(); initLeaderBoardBarChart(); }); -- Gitblit v1.9.3