CyberNika / v-contextmenu

🖱 ContextMenu based on Vue 3 & Vue 2
https://cybernika.github.io/v-contextmenu/
MIT License
918 stars 112 forks source link

[bug] 使用 show 方法显示菜单,超出屏幕时不能自动适配 #129

Closed joriwang closed 2 years ago

joriwang commented 2 years ago

期望结果

使用 show(position) 方法显示菜单时,菜单可以自动调整避免超出屏幕显示范围

实际结果

点击屏幕边缘时,菜单会超出显示范围

复现步骤

  1. 不设置 v-contextmenu 指令,自定义函数实现 @contextmenu.stop.prevent="handleListItemContextAction(item)"
  2. handleListItemContextAction 中调用 this.$refs.contextmenu.show(position)
  3. 点击屏幕边缘时,菜单超出屏幕范围

环境说明