默认主题色兼容

This commit is contained in:
灌糖包子 2023-01-28 03:39:07 +08:00
parent c0291d2404
commit 82236272a9
Signed by: sookie
GPG Key ID: 691E688C160D3188
2 changed files with 4 additions and 3 deletions

View File

@ -61,10 +61,11 @@ const onClick = () => {
}
}
const imgLoad = () => {
emit('adaptingTheme', themeColor(<HTMLImageElement>thumbnailPic.value))
const color = themeColor(<HTMLImageElement>thumbnailPic.value)
emit('adaptingTheme', `rgb(${color.r},${color.g},${color.b})`)
}
watch(() => props.pic, (pic?: string) => {
if (!pic) emit('adaptingTheme', props.theme)
if (!pic) emit('adaptingTheme', null)
}, { immediate: true })
</script>

View File

@ -651,7 +651,7 @@
}
},
setSelfAdaptingTheme (color) {
this.selfAdaptingTheme = `rgb(${color.r},${color.g},${color.b})`
this.selfAdaptingTheme = color
}
},
watch: {