mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
添加画质控制器
This commit is contained in:
1 parent
c118c407fc
commit
a4876e6c73
9 files changed
+129
-12
No files matched your search
@@ -3,6 +3,7 @@ export default class Events {
|
||||
this.art = art;
|
||||
this.destroyEvents = [];
|
||||
this.proxy = this.proxy.bind(this);
|
||||
this.hover = this.hover.bind(this);
|
||||
}
|
||||
|
||||
proxy(target, name, callback, option = {}) {
|
||||
@@ -16,6 +17,11 @@ export default class Events {
|
||||
});
|
||||
}
|
||||
|
||||
hover(target, mouseenter, mouseleave) {
|
||||
this.proxy(target, 'mouseenter', mouseenter);
|
||||
this.proxy(target, 'mouseleave', mouseleave);
|
||||
}
|
||||
|
||||
destroy() {
|
||||
this.destroyEvents.forEach(event => event());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user