默认主题色兼容
This commit is contained in:
parent
c0291d2404
commit
82236272a9
@ -61,10 +61,11 @@ const onClick = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const imgLoad = () => {
|
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) => {
|
watch(() => props.pic, (pic?: string) => {
|
||||||
if (!pic) emit('adaptingTheme', props.theme)
|
if (!pic) emit('adaptingTheme', null)
|
||||||
}, { immediate: true })
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -651,7 +651,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setSelfAdaptingTheme (color) {
|
setSelfAdaptingTheme (color) {
|
||||||
this.selfAdaptingTheme = `rgb(${color.r},${color.g},${color.b})`
|
this.selfAdaptingTheme = color
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user