类: TouchBarPopover
类: TouchBarPopover
为macOS原生应用在触摸栏中创建一个弹出控件
Process: Main
This class is not exported from the 'electron' module. 它只能作为 Electron API 中其他方法的返回值。
new TouchBarPopover(options)
选项对象labelstring (可选) 弹出按钮文本。iconNativeImage (optional) - Popover button icon.itemsTouchBar - Items to display in the popover.showCloseButtonboolean (可选) - 为true在弹出框左边显示一个关闭按钮,为false不显示它。 默认值为true。
实例属性
以下为 TouchBarPopover 实例的可用属性:
touchBarPopover.label
一个 string 值,表示弹出框当前按钮文本。 更改此值会立即更新 touch bar 中的弹出框。
touchBarPopover.icon
一个 NativeImage 值,表示弹出框当前按钮图标。 更改此值会立即更新 touch bar 中的弹出框。