mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 04:01:20 -08:00
fix bug
This commit is contained in:
1 parent
7cdf9f69e6
commit
32e93bb875
9 files changed
+23
-15
No files matched your search
+2
-2
@@ -38,8 +38,8 @@ export default class Contextmenu {
|
||||
this.setPos(event);
|
||||
});
|
||||
|
||||
proxy(refs.$container, 'click', () => {
|
||||
if (refs.$contextmenu) {
|
||||
proxy(refs.$container, 'click', event => {
|
||||
if (refs.$contextmenu && !event.path.includes(refs.$contextmenu)) {
|
||||
this.hide();
|
||||
}
|
||||
});
|
||||
|
||||
+1
-1
@@ -14,6 +14,6 @@ export default class Events {
|
||||
}
|
||||
|
||||
init() {
|
||||
console.log('init');
|
||||
console.log('Events init');
|
||||
}
|
||||
}
|
||||
+6
-3
@@ -3,23 +3,26 @@ import Icons from './icons';
|
||||
export default class Loading {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
this.state = false;
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
const { option } = this.art;
|
||||
const { option, refs: { $loading } } = this.art;
|
||||
if (option.loading) {
|
||||
this.art.refs.$loading.insertAdjacentHTML('beforeend', option.loading);
|
||||
$loading.insertAdjacentHTML('beforeend', option.loading);
|
||||
} else {
|
||||
this.art.refs.$loading.appendChild(Icons.loading);
|
||||
$loading.appendChild(Icons.loading);
|
||||
}
|
||||
}
|
||||
|
||||
hide() {
|
||||
this.state = false;
|
||||
this.art.refs.$loading.style.display = 'none';
|
||||
}
|
||||
|
||||
show() {
|
||||
this.state = true;
|
||||
this.art.refs.$loading.style.display = 'block';
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
.artplayer-contextmenu {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
z-index: 7;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 170px;
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
Reference in new issue
Block a user