fix: 修复themeColor大于10时,浏览器崩溃问题

This commit is contained in:
cuiyuanyuan 2021-11-09 16:39:41 +08:00
parent e931be0ab9
commit 5e4a9ba91a

View File

@ -129,7 +129,7 @@ export default defineComponent({
const themeColors = computed(() => {
let colors: string[] = []
if (props.themeColor.length === 10) colors = props.themeColor
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 {
const len = props.themeColor.length