> For the complete documentation index, see [llms.txt](https://yuzhigang5460.gitbook.io/electron/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yuzhigang5460.gitbook.io/electron/api/api-jie-kou-zhi-zhu-jin-cheng-jie-kou/touch-bar-popover.md).

# TouchBar触摸条弹出框

> 在本地MacOS应用程序的触摸栏中创建一个Popover弹出框

进程: [主进程](https://yuzhigang5460.gitbook.io/electron/api/api-jie-kou-zhi-zhu-jin-cheng-jie-kou/pages/-MAVO-K66dek3bIE7lJD#主进程)

## `new TouchBarPopover(options)` *实验功能*

> 用途:**创建新Popover弹出框**

* `options` Object
  * `label` String (可选) - Popover按钮文本
  * `icon` [NativeImage](/electron/api/api-jie-kou-zhi-zhu-jin-cheng-jie-kou/native-image.md) (可选) - Popover按钮图标
  * `items` [TouchBar](/electron/api/api-jie-kou-zhi-zhu-jin-cheng-jie-kou/touch-bar.md) (可选) - 在Popover弹出框中显示的项目
  * `showCloseButton` Boolean (可选) - 是否在左侧显示关闭文本,默认为 `false`.

## 实例属性

`TouchBarPopover`有以下属性:

### `touchBarPopover.label`

> 属性:**Popover的当前按钮文本**

### `touchBarPopover.icon`

> 属性:**Popover的当前按钮图标**
