forked from AkkomaGang/admin-fe
fix[tags-view]: fixed contexrmenu bug on firefox
This commit is contained in:
parent
6f2a7ce804
commit
eef99d3d14
1 changed files with 4 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="tags-view-container">
|
<div class="tags-view-container">
|
||||||
<scroll-pane class='tags-view-wrapper' ref='scrollPane'>
|
<scroll-pane class='tags-view-wrapper' ref='scrollPane'>
|
||||||
<router-link ref='tag' class="tags-view-item" :class="isActive(tag)?'active':''" v-for="tag in Array.from(visitedViews)" :to="tag.path" :key="tag.path" @contextmenu.prevent.native="openMenu(tag,$event)">
|
<router-link ref='tag' class="tags-view-item" :class="isActive(tag)?'active':''" v-for="tag in Array.from(visitedViews)"
|
||||||
|
:to="tag.path" :key="tag.path" @contextmenu.prevent.native="openMenu(tag,$event)">
|
||||||
{{generateTitle(tag.title)}}
|
{{generateTitle(tag.title)}}
|
||||||
<span class='el-icon-close' @click.prevent.stop='closeSelectedTag(tag)'></span>
|
<span class='el-icon-close' @click.prevent.stop='closeSelectedTag(tag)'></span>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
@ -40,9 +41,9 @@ export default {
|
||||||
},
|
},
|
||||||
visible(value) {
|
visible(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
window.addEventListener('click', this.closeMenu)
|
document.body.addEventListener('click', this.closeMenu)
|
||||||
} else {
|
} else {
|
||||||
window.removeEventListener('click', this.closeMenu)
|
document.body.removeEventListener('click', this.closeMenu)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue