Skip to content
Snippets Groups Projects
Commit eef99d3d authored by Pan's avatar Pan
Browse files

fix[tags-view]: fixed contexrmenu bug on firefox

parent 6f2a7ce8
No related branches found
No related tags found
No related merge requests found
<template>
<div class="tags-view-container">
<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)}}
<span class='el-icon-close' @click.prevent.stop='closeSelectedTag(tag)'></span>
</router-link>
......@@ -40,9 +41,9 @@ export default {
},
visible(value) {
if (value) {
window.addEventListener('click', this.closeMenu)
document.body.addEventListener('click', this.closeMenu)
} else {
window.removeEventListener('click', this.closeMenu)
document.body.removeEventListener('click', this.closeMenu)
}
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment