类:TouchBarScrubber
类:TouchBarScrubber
🌐 Class: TouchBarScrubber
创建一个滚动选择器
进程: 主进程
此类未从 'electron' 模块导出。它仅作为 Electron API 中其他方法的返回值提供。
new TouchBarScrubber(options)
实例属性
🌐 Instance Properties
TouchBarScrubber 实例上可用的属性如下:
🌐 The following properties are available on instances of TouchBarScrubber:
touchBarScrubber.items
一个 ScrubberItem[] 数组,表示此滚动选择器中的项目。更新此值会立即更新触控栏中的控件。更新此数组中的深层属性 不会更新触控栏。
🌐 A ScrubberItem[] array representing the items in this scrubber. Updating this value immediately
updates the control in the touch bar. Updating deep properties inside this array does not update the touch bar.
touchBarScrubber.selectedStyle
string 表示在滚动选择器中被选中项应具有的样式。更新此值会立即更新触控栏中的控件。可能的值有:
🌐 A string representing the style that selected items in the scrubber should have. Updating this value immediately
updates the control in the touch bar. Possible values:
background- 映射到[NSScrubberSelectionStyle roundedBackgroundStyle]。outline- 映射到[NSScrubberSelectionStyle outlineOverlayStyle]。none- 删除所有样式。
touchBarScrubber.overlayStyle
一个 string,表示应为擦除器中所选项目设置的样式。此样式会叠加在擦除器项目之上,而不是放在其后面。更新此值会立即更新触控栏中的控件。可能的值有:
🌐 A string representing the style that selected items in the scrubber should have. This style is overlaid on top
of the scrubber item instead of being placed behind it. Updating this value immediately updates the control in the
touch bar. Possible values:
background- 映射到[NSScrubberSelectionStyle roundedBackgroundStyle]。outline- 映射到[NSScrubberSelectionStyle outlineOverlayStyle]。none- 删除所有样式。
touchBarScrubber.showArrowButtons
boolean 表示是否在此滚动条中显示左右选择箭头。更新此值会立即更新触控栏中的控件。
🌐 A boolean representing whether to show the left / right selection arrows in this scrubber. Updating this value
immediately updates the control in the touch bar.
touchBarScrubber.mode
表示此擦除器模式的 string。更新此值会立即更新触控栏中的控件。可能的取值有:
🌐 A string representing the mode of this scrubber. Updating this value immediately
updates the control in the touch bar. Possible values:
fixed- 映射到NSScrubberModeFixed。free- 映射到NSScrubberModeFree。
touchBarScrubber.continuous
boolean 表示此滑块是否连续。更新此值会立即更新触控栏中的控件。
🌐 A boolean representing whether this scrubber is continuous or not. Updating this value immediately
updates the control in the touch bar.