类:TouchBarSlider
类:TouchBarSlider
¥Class: TouchBarSlider
在触摸栏中为原生 macOS 应用创建滑块
¥Create a slider in the touch bar for native macOS applications
进程:主进程
该类不是从 'electron'
模块导出的。它仅可用作 Electron API 中其他方法的返回值。
¥Process: Main
This class is not exported from the 'electron'
module. It is only available as a return value of other methods in the Electron API.
new TouchBarSlider(options)
实例属性
¥Instance Properties
以下属性在 TouchBarSlider
的实例上可用:
¥The following properties are available on instances of TouchBarSlider
:
touchBarSlider.label
代表滑块当前文本的 string
。更改此值会立即更新触摸栏中的滑块。
¥A string
representing the slider's current text. Changing this value immediately updates the slider
in the touch bar.
touchBarSlider.value
number
代表滑块的当前值。更改此值会立即更新触摸栏中的滑块。
¥A number
representing the slider's current value. Changing this value immediately updates the slider
in the touch bar.
touchBarSlider.minValue
number
代表滑块当前的最小值。更改此值会立即更新触摸栏中的滑块。
¥A number
representing the slider's current minimum value. Changing this value immediately updates the
slider in the touch bar.
touchBarSlider.maxValue
number
代表滑块的当前最大值。更改此值会立即更新触摸栏中的滑块。
¥A number
representing the slider's current maximum value. Changing this value immediately updates the
slider in the touch bar.