6.2. 动态插件集成的挂载点


您可以使用动态插件的挂载点自定义 Developer Hub 中的应用程序标头。这些挂载点为配置标头、其组件和下拉菜单的位置提供了灵活性。您可以使用以下改进创建自定义体验:

application/header
控制标头位置。使用 config.position 将放置设置为 above-main-contentabove-sidebar
global.header/component

配置标头组件。使用 config.priority 设置组件顺序,并通过 config.props 传递属性(包括 CSS 风格)。

添加 自助服务 按钮示例

- mountPoint: global.header/component
  importName: HeaderIconButton
  config:
    priority: 80
    props:
      title: Self-service
      icon: add
      to: create

添加一个 spacer 元素示例

- mountPoint: global.header/component
  importName: Spacer
  config:
    priority: 99
    props:
      growFactor: 0

添加划分元素示例

mountPoints:
  - mountPoint: global.header/component
    importName: Divider
    config:
      priority: 150

global.header/profile

启用 ProfileDropdown 组件时,配置配置文件下拉列表。

在配置集下拉菜单中添加设置链接示例

- mountPoint: global.header/profile
  importName: MenuItemLink
  config:
    priority: 100
    props:
      title: Settings
      link: /settings
      icon: manageAccounts

global.header/create

启用 CreateDropdown 组件时,配置创建下拉列表。

添加用于注册组件的部分示例

- mountPoint: global.header/create
  importName: RegisterAComponentSection
  config:
    props:
      growFactor: 0

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部