The mac side uses electron to create the right-click menu of the notification bar icon, and the left button takes effect.

when using electron, I set the right-click menu for tray in the main process, but when it runs, only the left button takes effect. I wanted to click the left button to make the window appear and the right button to exit the menu. The code runs normally in windows. May I ask why? the code is as follows:

clipboard.png

clipboard.png
the exit above is when I click the left button, but the click event of the icon is gone, everything is normal on windows, the big gods help me take a look, kneel and thank you!

Mar.16,2021
Menu