Optimize Tabs contextMenu
This commit is contained in:
parent
e3d2e05598
commit
0a3ea18b48
1 changed files with 15 additions and 12 deletions
|
@ -332,6 +332,8 @@
|
|||
this.$emit('on-dblclick', nav.name);
|
||||
},
|
||||
handleContextmenu (index, event) {
|
||||
if (this.contextMenuVisible) this.handleClickContextMenuOutside();
|
||||
this.$nextTick(() => {
|
||||
const nav = this.navList[index];
|
||||
if (!nav || nav.disabled || !nav.contextMenu) return;
|
||||
|
||||
|
@ -345,6 +347,7 @@
|
|||
this.contextMenuStyles = position;
|
||||
this.contextMenuVisible = true;
|
||||
this.$emit('on-contextmenu', nav, event, position);
|
||||
});
|
||||
},
|
||||
handleClickContextMenuOutside () {
|
||||
this.contextMenuVisible = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue