|
@@ -173,6 +173,7 @@ export default {
|
|
|
openMenu(tag, e) {
|
|
|
const menuMinWidth = 105
|
|
|
const offsetLeft = this.$el.getBoundingClientRect().left // container margin left
|
|
|
+ const offsetTop = this.$el.getBoundingClientRect().top // container margin left
|
|
|
const offsetWidth = this.$el.offsetWidth // container width
|
|
|
const maxLeft = offsetWidth - menuMinWidth // left boundary
|
|
|
const left = e.clientX - offsetLeft + 15 // 15: margin right
|
|
@@ -183,7 +184,11 @@ export default {
|
|
|
this.left = left
|
|
|
}
|
|
|
|
|
|
- this.top = e.clientY
|
|
|
+ if (this.$store.state.settings.fixedHeader) {
|
|
|
+ this.top = e.clientY - offsetTop
|
|
|
+ } else {
|
|
|
+ this.top = e.clientY
|
|
|
+ }
|
|
|
this.visible = true
|
|
|
this.selectedTag = tag
|
|
|
},
|