fix[TagsView]: fix contextmenu position bug #850

This commit is contained in:
Pan 2018-07-09 17:25:45 +08:00
parent 9e04f58163
commit 89ce53e185
1 changed files with 2 additions and 1 deletions

View File

@ -104,7 +104,8 @@ export default {
openMenu(tag, e) { openMenu(tag, e) {
this.visible = true this.visible = true
this.selectedTag = tag this.selectedTag = tag
this.left = e.clientX const offsetLeft = this.$el.getBoundingClientRect().left // container margin left
this.left = e.clientX - offsetLeft + 15 // 15: margin right
this.top = e.clientY this.top = e.clientY
}, },
closeMenu() { closeMenu() {