From 0f9bac2804aa28918489e8f057129c52841f1475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=81=A5?= Date: Fri, 7 Apr 2023 17:33:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=BE=E8=A1=A8=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E8=B0=83=E8=8A=82=E9=80=8F=E6=98=8E=E5=BA=A6?= =?UTF-8?q?=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/element/ChartElement/Chart.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/components/element/ChartElement/Chart.vue b/src/views/components/element/ChartElement/Chart.vue index 24f71cd2..fbbcad75 100644 --- a/src/views/components/element/ChartElement/Chart.vue +++ b/src/views/components/element/ChartElement/Chart.vue @@ -124,10 +124,10 @@ onMounted(renderChart) const themeColors = computed(() => { let colors: string[] = [] if (props.themeColor.length >= 10) colors = props.themeColor - else if (props.themeColor.length === 1) colors = tinycolor(props.themeColor[0]).analogous(10).map(color => color.toHexString()) + else if (props.themeColor.length === 1) colors = tinycolor(props.themeColor[0]).analogous(10).map(color => color.toRgbString()) else { const len = props.themeColor.length - const supplement = tinycolor(props.themeColor[len - 1]).analogous(10 + 1 - len).map(color => color.toHexString()) + const supplement = tinycolor(props.themeColor[len - 1]).analogous(10 + 1 - len).map(color => color.toRgbString()) colors = [...props.themeColor.slice(0, len - 1), ...supplement] } return colors