mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-06 16:37:18 +08:00
feat: 点击鼠标滚轮键关闭标签页
This commit is contained in:
parent
a9ee9ebcf9
commit
c97c0dada2
@ -514,6 +514,13 @@ function tagOnClick(item) {
|
|||||||
emitter.emit("tagOnClick", item);
|
emitter.emit("tagOnClick", item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 点击鼠标滚轮键关闭标签页 */
|
||||||
|
function tagOnMousedown(index: Number, item: any, e: MouseEvent) {
|
||||||
|
if (e.button == 1 && index !== 0) {
|
||||||
|
deleteMenu(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onClickOutside(contextmenuRef, closeMenu, {
|
onClickOutside(contextmenuRef, closeMenu, {
|
||||||
detectIframe: true
|
detectIframe: true
|
||||||
});
|
});
|
||||||
@ -586,6 +593,7 @@ onBeforeUnmount(() => {
|
|||||||
@mouseenter.prevent="onMouseenter(index)"
|
@mouseenter.prevent="onMouseenter(index)"
|
||||||
@mouseleave.prevent="onMouseleave(index)"
|
@mouseleave.prevent="onMouseleave(index)"
|
||||||
@click="tagOnClick(item)"
|
@click="tagOnClick(item)"
|
||||||
|
@mousedown="tagOnMousedown(index, item, $event)"
|
||||||
>
|
>
|
||||||
<template v-if="showModel !== 'chrome'">
|
<template v-if="showModel !== 'chrome'">
|
||||||
<span
|
<span
|
||||||
|
Loading…
x
Reference in New Issue
Block a user