ShareMenu
The ShareMenu
class creates Share Menu on macOS, which can be used to share information from the current context to apps, social media accounts, and other services.ShareMenu
类在macOS上创建共享菜单,可用于将当前上下文中的信息共享给应用程序、社交媒体帐户和其他服务。
For including the share menu as a submenu of other menus, please use the 要将共享菜单包含为其他菜单的子菜单,请使用MenuItem的shareMenu
role of MenuItem.shareMenu
角色。
Class: ShareMenu
Create share menu on macOS.在macOS上创建共享菜单。
Process:进程:Main
new ShareMenu(sharingItem)
sharingItem
SharingItem -The item to share.要共享的项目。
Creates a new share menu.创建一个新的共享菜单。
Instance Methods实例方法
The shareMenu
object has the following instance methods:shareMenu
对象具有以下实例方法:
shareMenu.popup([options])
Pops up this menu as a context menu in the BrowserWindow.在BrowserWindow中弹出此菜单作为上下文菜单。
shareMenu.closePopup([browserWindow])
browserWindow
BrowserWindow (optional) -Default is the focused window.默认为聚焦窗口。
Closes the context menu in the 关闭browserWindow
.browserWindow
中的上下文菜单。