fix: 修复旧版本没有legend配置导致报settting color错误

This commit is contained in:
lyx 2023-06-09 10:56:36 +08:00
parent 37676176e7
commit 27e2e2c68d

View File

@ -391,8 +391,12 @@ const visualMap = computed(() => {
// legend colortype = 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,