diff --git a/web/src/pages/Edit/components/Contextmenu.vue b/web/src/pages/Edit/components/Contextmenu.vue index 2110cfbc..c98f2418 100644 --- a/web/src/pages/Edit/components/Contextmenu.vue +++ b/web/src/pages/Edit/components/Contextmenu.vue @@ -344,12 +344,11 @@ export default { // 计算右键菜单元素的显示位置 getShowPosition(x, y) { - this.subItemsShowLeft = false const rect = this.$refs.contextmenuRef.getBoundingClientRect() if (x + rect.width > window.innerWidth) { x = x - rect.width - 20 - this.subItemsShowLeft = true } + this.subItemsShowLeft = x + rect.width + 150 > window.innerWidth if (y + rect.height > window.innerHeight) { y = window.innerHeight - rect.height - 10 }