类: TouchBarLabel
类: TouchBarLabel
为 macOS 原生应用在触控栏中创建标签
进程: 主
此类未从 'electron'
模块导出。它仅作为 Electron API 中其他方法的返回值提供。
new TouchBarLabel(options)
定义 accessibilityLabel
时,请确保您已考虑了 macOS 最佳实践。
实例属性
以下属性在 TouchBarLabel
的实例上可用
touchBarLabel.label
表示标签当前文本的 string
。更改此值会立即更新触控栏中的标签。
touchBarLabel.accessibilityLabel
表示供屏幕阅读器读取的标签描述的 string
。
touchBarLabel.textColor
表示标签当前文本颜色的 string
十六进制代码。更改此值会立即更新触控栏中的标签。