From 74d3009146d83a272286e1d5e60d38a13a3f3c89 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期一, 26 五月 2025 15:27:16 +0800 Subject: [PATCH] 导出与自定义标签 --- src/views/screen/components/subheading.vue | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/views/screen/components/subheading.vue b/src/views/screen/components/subheading.vue index 9935174..aeae700 100644 --- a/src/views/screen/components/subheading.vue +++ b/src/views/screen/components/subheading.vue @@ -27,6 +27,13 @@ }, methods: { + setFontSize(res){ + const clientWidth = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth; + if (!clientWidth) return; + let fontSize = clientWidth / 1920; + return res*fontSize; + }, + initChart (val1, val2, color) { const annularDom = this.$refs.echarts const myAnnular = this.$echarts.init(annularDom) @@ -64,7 +71,7 @@ show: true, // 鍗曠嫭鏄剧ず璇ユ暟鎹」 formatter: val1 + '', color: color, - fontSize: 14 + fontSize: this.setFontSize(14) } }, -- Gitblit v1.8.0