Skip to content

Commit

Permalink
refactor(packages): @sa/materials: remove tab close shortcut by mouse
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Sep 21, 2024
1 parent c0e8795 commit 9fb722d
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions packages/materials/src/libs/page-tab/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,10 @@ const bindProps = computed(() => {
function handleClose() {
emit('close');
}
function handleMouseup(e: MouseEvent) {
// close tab by mouse wheel button click
if (e.button === 1) {
handleClose();
}
}
</script>

<template>
<component
:is="activeTabComponent.component"
:class="activeTabComponent.class"
:style="cssVars"
v-bind="bindProps"
@mouseup="handleMouseup"
>
<component :is="activeTabComponent.component" :class="activeTabComponent.class" :style="cssVars" v-bind="bindProps">
<template #prefix>
<slot name="prefix"></slot>
</template>
Expand Down

0 comments on commit 9fb722d

Please sign in to comment.