feat: middle click to close tabs

This commit is contained in:
Fabio 2020-08-21 10:57:26 +02:00
parent 196a3e0185
commit 256ec76588
1 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,7 @@
class="tab-item"
:class="{'active': selectedTab === tab.uid}"
@click="selectTab({uid: workspace.uid, tab: tab.uid})"
@mousedown.middle="closeTab(tab.uid)"
>
<a>
<span>
@ -132,6 +133,7 @@ export default {
this.newTab(this.connection.uid);
},
closeTab (tUid) {
if (this.queryTabs.length === 1) return;
this.removeTab({ uid: this.connection.uid, tab: tUid });
}
}