mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 21:31:20 -08:00
优化菜单
This commit is contained in:
1 parent
9e36a1ba44
commit
b3c2452758
3 files changed
+8
-7
No files matched your search
@@ -10,11 +10,12 @@ export default class Contextmenu {
|
||||
constructor(art) {
|
||||
this.id = 0;
|
||||
this.art = art;
|
||||
this.art.on('ready', () => {
|
||||
|
||||
art.on('ready', () => {
|
||||
this.init();
|
||||
});
|
||||
|
||||
this.art.on('blur', () => {
|
||||
art.on('blur', () => {
|
||||
this.show = false;
|
||||
});
|
||||
}
|
||||
@@ -84,8 +85,8 @@ export default class Contextmenu {
|
||||
}
|
||||
|
||||
add(item, callback) {
|
||||
const { $contextmenu } = this.art.template;
|
||||
this.id += 1;
|
||||
const { $contextmenu } = this.art.template;
|
||||
return component(this.art, this, $contextmenu, item, callback, 'contextmenu');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user