Closed joriwang closed 2 years ago
使用 show(position) 方法显示菜单时,菜单可以自动调整避免超出屏幕显示范围
show(position)
点击屏幕边缘时,菜单会超出显示范围
v-contextmenu
@contextmenu.stop.prevent="handleListItemContextAction(item)"
handleListItemContextAction
this.$refs.contextmenu.show(position)
Vue
期望结果
使用
show(position)
方法显示菜单时,菜单可以自动调整避免超出屏幕显示范围实际结果
点击屏幕边缘时,菜单会超出显示范围
复现步骤
v-contextmenu
指令,自定义函数实现@contextmenu.stop.prevent="handleListItemContextAction(item)"
handleListItemContextAction
中调用this.$refs.contextmenu.show(position)
环境说明
Vue
版本:2.6.14