mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 02:21:20 -08:00
简化事件
This commit is contained in:
1 parent
938b90f3a7
commit
4718cd186b
36 files changed
+223
-250
No files matched your search
@@ -10,15 +10,17 @@ export default function hoverInit(art, events) {
|
||||
$player,
|
||||
() => {
|
||||
addClass($player, 'art-hover');
|
||||
art.emit('hoverenter');
|
||||
art.emit('hover', true);
|
||||
},
|
||||
() => {
|
||||
removeClass($player, 'art-hover');
|
||||
art.emit('hoverleave');
|
||||
art.emit('hover');
|
||||
},
|
||||
);
|
||||
|
||||
art.on('hoverleave', () => {
|
||||
controls.delayHide();
|
||||
art.on('hover', (value) => {
|
||||
if (!value) {
|
||||
controls.delayHide();
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user