Skip to content

Commit

Permalink
Merge pull request #85 from ruinmi/main
Browse files Browse the repository at this point in the history
鼠标中键关闭match history tab
  • Loading branch information
Hanxven authored Aug 22, 2024
2 parents b9a43d6 + 718031c commit d3dd783
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
>
<NTab
v-for="tab of mh.tabs"
@mousedown="(event) => handleMouseDown(event, tab.id)"
@contextmenu="(event) => handleShowMenu(event, tab.id)"
:key="tab.id"
:tab="tabNames[tab.id]"
Expand Down Expand Up @@ -318,6 +319,12 @@ const dropdownOptions = reactive([
}
])
const handleMouseDown = (event, tabId) => {
if (event.button === 1) {
mh.closeTab(tabId);
}
}
const handleMenuSelect = (action: string) => {
switch (action) {
case 'refresh':
Expand Down

0 comments on commit d3dd783

Please sign in to comment.