mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 02:01:20 -08:00
add posterMix
This commit is contained in:
1 parent
d5b4851a8f
commit
ec97a5912e
9 files changed
+77
-55
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { def, setStyle } from '../utils';
|
||||
|
||||
export default function posterMix(art, player) {
|
||||
const {
|
||||
option,
|
||||
template: { $poster },
|
||||
} = art;
|
||||
|
||||
def(player, 'poster', {
|
||||
get: () => option.poster,
|
||||
set(url) {
|
||||
option.poster = url;
|
||||
setStyle($poster, 'backgroundImage', `url(${url})`);
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user