Skip to main content

类:TouchBarSpacer

类:TouchBarSpacer

🌐 Class: TouchBarSpacer

在本地 macOS 应用的触控栏中创建两个项目之间的间隔

进程: 主进程
此类未从 'electron' 模块导出。它仅作为 Electron API 中其他方法的返回值提供。

new TouchBarSpacer(options)

  • options 对象
    • size 字符串(可选)- 间隔的大小,可能的取值为:
      • small - 物品之间的小间距。映射到 NSTouchBarItemIdentifierFixedSpaceSmall。这是默认设置。
      • large - 项目之间有大间距。映射到 NSTouchBarItemIdentifierFixedSpaceLarge
      • flexible - 占用所有可用空间。映射到 NSTouchBarItemIdentifierFlexibleSpace

实例属性

🌐 Instance Properties

TouchBarSpacer 实例上可用的属性如下:

🌐 The following properties are available on instances of TouchBarSpacer:

touchBarSpacer.size

表示间隔器尺寸的 string。可以是 smalllargeflexible

🌐 A string representing the size of the spacer. Can be small, large or flexible.