fix(tab): fix active tab switch issue after removal

- Optimized `removeTab` to use index-based removal for better efficiency
- Ensured the next tab is selected correctly when removing the active tab
- Prevented unnecessary state updates"
This commit is contained in:
c_7
2025-03-19 19:40:35 +08:00
parent a5c9a19838
commit a467f50136
2 changed files with 7 additions and 18 deletions

View File

@@ -63,7 +63,7 @@ function handleClose() {
<slot></slot>
<template #suffix>
<slot name="suffix">
<SvgClose v-if="closable" :class="[style['svg-close']]" @click.stop="handleClose" />
<SvgClose v-if="closable" :class="[style['svg-close']]" @pointerdown.stop="handleClose" />
</slot>
</template>
</component>