mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 图表主题颜色调节透明度无效
This commit is contained in:
parent
c7c5de1de2
commit
0f9bac2804
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user