Merge pull request #72 from cyyjs/master

fix: 修复themeColor大于10时,浏览器崩溃问题
This commit is contained in:
LLzzZZ 2021-11-13 15:28:29 +08:00 committed by GitHub
commit e7d0093742
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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