压缩字符

This commit is contained in:
Harvey committed 2019-11-27 15:46:55 +08:00
1 parent 2df60a78ff
commit 5f40463713
40 files changed
+385 -481

No files matched your search

+5 -6
View File
@@ -11,7 +11,7 @@ export default class Events {
this.loadImg = this.loadImg.bind(this);
if (art.whitelist.state) {
art.once('video:canplay', () => {
art.on('ready', () => {
clickInit(art, this);
hoverInit(art, this);
mousemoveInit(art, this);
@@ -22,14 +22,13 @@ export default class Events {
proxy(target, name, callback, option = {}) {
if (Array.isArray(name)) {
name.forEach(item => this.proxy(target, item, callback, option));
return;
return name.map(item => this.proxy(target, item, callback, option));
}
target.addEventListener(name, callback, option);
this.destroyEvents.push(() => {
target.removeEventListener(name, callback, option);
});
const destroy = () => target.removeEventListener(name, callback, option);
this.destroyEvents.push(destroy);
return destroy;
}
hover(target, mouseenter, mouseleave) {