SxAdminClientList UI 设计规范

自动生成时间: 2026-02-04 组件路径: src/NextUI.Blazor/Components/Admin/SxAdminClientList.razor

1. 组件概述

  • 组件包含 4 个参数,0 个回调,0 个公开方法。
  • 内部组合组件:SxAdminRoleList, SxBadge, SxButton, SxCard, SxDataGrid, SxDialog, SxDivider, SxGrid, SxIcon, SxMessageBar, SxProgressRing, SxPropertyColumn...。

2. 组件模式

模式 条件 说明
条件渲染 ShowCreateButton 影响局部渲染块
条件渲染 _loading 影响局部渲染块
条件渲染 string.IsNullOrEmpty(_searchText 影响局部渲染块
条件渲染 !string.IsNullOrEmpty(context.Name 影响局部渲染块
条件渲染 context.PublicClient 影响局部渲染块
条件渲染 context.Enabled 影响局部渲染块
条件渲染 ShowDeleteButton 影响局部渲染块
条件渲染 _selectedClient != null 影响局部渲染块
条件渲染 _selectedClient != null 影响局部渲染块
条件渲染 _selectedClient.RedirectUris?.Count > 0 影响局部渲染块
条件渲染 _selectedClient.StandardFlowEnabled 影响局部渲染块
条件渲染 _selectedClient.ImplicitFlowEnabled 影响局部渲染块
条件渲染 _selectedClient.DirectAccessGrantsEnabled 影响局部渲染块
条件渲染 _selectedClient.ServiceAccountsEnabled 影响局部渲染块
条件渲染 _selectedClient.AuthorizationServicesEnabled 影响局部渲染块

3. 表单字段

字段组件 绑定
- -

4. 操作按钮

外观 动作/链接 禁用条件
ButtonAppearance.Outline RefreshClients _loading
ButtonAppearance.Accent CreateClient -
ButtonAppearance.Stealth - -
ButtonAppearance.Stealth - -
ButtonAppearance.Stealth - -
ButtonAppearance.Outline - -
ButtonAppearance.Outline - -
ButtonAppearance.Accent - -
ButtonAppearance.Outline - -
ButtonAppearance.Accent DeleteClient -

5. 验证规则

未检测到显式验证标记。

6. 状态与流程

内部状态字段: 未检测到明确状态字段。

7. 公共 API

7.1 Parameters

参数 类型 默认值 说明
HeaderText string "Client Management" Header text for the client list.
Realm string "master" The realm to manage clients for.
ShowCreateButton bool true Whether to show the create button.
ShowDeleteButton bool true Whether to show the delete button.

7.2 Public Methods

无公开方法。

7.3 Events/Callbacks

无回调事件。

8. 典型使用场景 (Use Cases)

8.1 UC-1: 基础渲染

  1. 组件渲染默认状态
  2. 关键区域可见
  3. 无异常

9. 状态不变性测试 (State Invariants)

  • 同一参数重复设置不应触发非必要 UI 改变
  • 与表单字段无关的操作不应影响字段值

10. 测试检查点

  • 条件 ShowCreateButton 下渲染正确
  • 条件 _loading 下渲染正确
  • 条件 string.IsNullOrEmpty(_searchText 下渲染正确
  • 条件 !string.IsNullOrEmpty(context.Name 下渲染正确
  • 条件 context.PublicClient 下渲染正确
  • 条件 context.Enabled 下渲染正确
  • 条件 ShowDeleteButton 下渲染正确
  • 条件 _selectedClient != null 下渲染正确

11. Fluent UI 对齐

未在官方 Fluent UI Blazor 组件目录中找到直接对应项(以官方 demo/docs 目录为准)。

12. 参考文档摘要

  • docs/IDENTITY-ADMIN-PLATFORM.md: NextUI Identity Admin Platform 设计方案 ## 1. 概述

13. 规范合规检查

  • 可能存在硬编码样式: 存在 px 硬编码

14. 变更历史

  • 2026-02-04: 深度分析填充规范。