Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问不用组件模式时,如何监听到close事件 #41

Closed
qinyao86 opened this issue Apr 28, 2023 · 2 comments
Closed

请问不用组件模式时,如何监听到close事件 #41

qinyao86 opened this issue Apr 28, 2023 · 2 comments

Comments

@qinyao86
Copy link

效果很好的右键菜单,
请问不用组件模式时,如何监听到close事件

imengyu added a commit that referenced this issue Apr 29, 2023
…SubMenuClose` (submenu close) event callbacks for function mode. (#41)
@imengyu
Copy link
Owner

imengyu commented Apr 29, 2023

感谢您的支持。

可以更新至1.2.6,这个版本新增了 onClose 回调,可以这样使用:

ContextMenu.showContextMenu({
  //...
  items: [ ... ],
  //整个菜单关闭事件
  onClose() {
    console.log('菜单关闭');
  },
});

@qinyao86
Copy link
Author

作者帅气!

@imengyu imengyu closed this as completed May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants