* [bug#54793] fix contextmenu cant show.

This commit is contained in:
dingyongliang
2024-09-06 14:09:33 +08:00
committed by 孙广明
parent 34231a4a17
commit ced82abdcf
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -181,14 +181,15 @@ $(document).on(
];
zui.ContextMenu.show(
if(window.customNavbarContextMenu) window.customNavbarContextMenu.hide();
window.customNavbarContextMenu = zui.ContextMenu.show(
{
hideOthers: true,
element: $item[0],
placement: 'bottom-start',
items: items,
event: event,
onClickItem: (info) => info.event.preventDefault()
onClickItem: (info) => info.event.preventDefault(),
onHide: () => window.customNavbarContextMenu = null,
}
);
event.preventDefault();
+4 -3
View File
@@ -220,14 +220,15 @@ $(document).on(
}
}
];
zui.ContextMenu.show(
if(window.customNavbarContextMenu) window.customNavbarContextMenu.hide();
window.customNavbarContextMenu = zui.ContextMenu.show(
{
hideOthers: true,
element: $item[0],
placement: 'bottom-start',
items: items,
event: event,
onClickItem: (info) => info.event.preventDefault()
onClickItem: (info) => info.event.preventDefault(),
onHide: () => window.customNavbarContextMenu = null,
}
);
event.preventDefault();