默认主题色兼容

This commit is contained in:
2023-01-28 03:39:07 +08:00
parent c0291d2404
commit 82236272a9
2 changed files with 4 additions and 3 deletions
@@ -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>
+1 -1
View File
@@ -651,7 +651,7 @@
}
},
setSelfAdaptingTheme (color) {
this.selfAdaptingTheme = `rgb(${color.r},${color.g},${color.b})`
this.selfAdaptingTheme = color
}
},
watch: {