From e903489a529f88a125f549f8dc2a2f7d04b0295b Mon Sep 17 00:00:00 2001 From: lyx Date: Fri, 9 Jun 2023 10:56:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A7=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=B2=A1=E6=9C=89legend=E9=85=8D=E7=BD=AE=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=8A=A5settting=20color=E9=94=99=E8=AF=AF?= 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,