优化菜单

This commit is contained in:
Harvey committed 2019-11-15 11:02:44 +08:00
1 parent 9e36a1ba44
commit b3c2452758
3 files changed
+8 -7

No files matched your search

+4 -3
View File
@@ -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');
}