diff --git a/src/views/api/aplayer/components/aplayer-thumbnail.vue b/src/views/api/aplayer/components/aplayer-thumbnail.vue index dd95e24..776ea07 100644 --- a/src/views/api/aplayer/components/aplayer-thumbnail.vue +++ b/src/views/api/aplayer/components/aplayer-thumbnail.vue @@ -61,10 +61,11 @@ const onClick = () => { } } const imgLoad = () => { - emit('adaptingTheme', themeColor(thumbnailPic.value)) + const color = themeColor(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 }) diff --git a/src/views/api/aplayer/vue-aplayer.vue b/src/views/api/aplayer/vue-aplayer.vue index 05ee68a..59862fd 100644 --- a/src/views/api/aplayer/vue-aplayer.vue +++ b/src/views/api/aplayer/vue-aplayer.vue @@ -651,7 +651,7 @@ } }, setSelfAdaptingTheme (color) { - this.selfAdaptingTheme = `rgb(${color.r},${color.g},${color.b})` + this.selfAdaptingTheme = color } }, watch: {