提交 eef99d3d 编写于 作者: P Pan

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

上级 6f2a7ce8
<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)
}
}
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册