fix: contextmenu location not right when body with scroll (#3516)
Co-authored-by: quanbisen <bisen_quan@lebo.cn>
This commit is contained in:
parent
a20bac1682
commit
c2c9f4f556
|
|
@ -34,7 +34,7 @@ export const createContextMenu = function (options: CreateContextOptions) {
|
|||
|
||||
if (options.event) {
|
||||
propsData.customEvent = event;
|
||||
propsData.axis = { x: event.clientX, y: event.clientY };
|
||||
propsData.axis = { x: event.clientX, y: event.clientY + body.scrollTop }; // y坐标需加上body往上滚动的Y
|
||||
}
|
||||
|
||||
const vm = createVNode(contextMenuVue, propsData);
|
||||
|
|
|
|||
Loading…
Reference in New Issue