ShareMenu
若要将共享菜单放在其他菜单下,使用当中的shareMenu
。
进程:主进程
- SharingItem - The item to share.
实例方法
shareMenu
对象具有以下实例方法:
shareMenu.popup([options])
options
PopupOptions (optional)x
Number (可选) - 默认为当前鼠标的位置。 如果指定了y
,则该选项必选。- Number (可选) - 默认为当前鼠标的位置。 如果指定了
x
,则该选项必选。 positioningItem
Number (optional) macOS - The index of the menu item to be positioned under the mouse cursor at the specified coordinates. 默认值为 -1。
shareMenu.closePopup([browserWindow])
browserWindow
BrowserWindow (可选) - 默认为选中窗口.
关闭 browserWindow
中的上下文菜单。