ShareMenu
ShareMenu 类用于创建macOS的Share Menu专用菜单 ,这可以将当前消息分享给其他应用、社交媒体账号等。
For including the share menu as a submenu of other menus, please use the shareMenu role of MenuItem.
Class: ShareMenu
在 macOS 上创建共享菜单。
Process: Main
[!WARNING] Electron's built-in classes cannot be subclassed in user code. For more information, see the FAQ.
new ShareMenu(sharingItem)
sharingItemSharingItem - 要共享的项
创建一个新的共享菜单。
实例方法
shareMenu 对象具有以下实例方法:
shareMenu.popup([options])
Pops up this menu as a context menu in the BrowserWindow.
shareMenu.closePopup([browserWindow])
browserWindowBrowserWindow (optional) - Default is the focused window.
关闭 browserWindow 中的上下文菜单。