From 5387a7ad90cf71f4d9b4da45ace2b9050b1e4cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Thu, 15 Jun 2023 11:45:41 +0000 Subject: [PATCH] =?UTF-8?q?!171=20fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A7?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=B2=A1=E6=9C=89legend=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8A=A5settting=20color=E9=94=99=E8=AF=AF?= =?UTF-8?q?=20Merge=20pull=20request=20!171=20from=20h5coder/h5coder-fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Pages/ChartItemSetting/GlobalSetting.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Pages/ChartItemSetting/GlobalSetting.vue b/src/components/Pages/ChartItemSetting/GlobalSetting.vue index 81f9d3d7..68e3fb00 100644 --- a/src/components/Pages/ChartItemSetting/GlobalSetting.vue +++ b/src/components/Pages/ChartItemSetting/GlobalSetting.vue @@ -391,8 +391,12 @@ const visualMap = computed(() => { // 监听legend color颜色改变type = scroll的颜色 watch(() => legend.value && legend.value.textStyle.color, (newVal) => { if (legend.value && newVal) { - legend.value.pageTextStyle.color = newVal - } + if (!legend.value.pageTextStyle) { + legend.value.pageTextStyle = { color: newVal } + } else { + legend.value.pageTextStyle.color = newVal + } + } }, { immediate: true, deep: true,