From ca95e1f3288e83d1c4bc81151ba0e4a3ff27725c Mon Sep 17 00:00:00 2001 From: ice6 Date: Thu, 1 Jan 2026 23:13:01 +0800 Subject: [PATCH 01/34] feat(llmstxt): code init --- .github/workflows/build.yml | 4 + .github/workflows/docker.yml | 10 + .gitignore | 3 + README.md | 58 + src/BootstrapBlazor.Server/Dockerfile | 6 +- .../wwwroot/llmstxt/llms-button.txt | 572 +++ .../wwwroot/llmstxt/llms-card.txt | 128 + .../wwwroot/llmstxt/llms-dialog.txt | 408 ++ .../wwwroot/llmstxt/llms-example-project.txt | 150 + .../wwwroot/llmstxt/llms-form.txt | 101 + .../wwwroot/llmstxt/llms-input.txt | 265 ++ .../wwwroot/llmstxt/llms-nav.txt | 671 +++ .../wwwroot/llmstxt/llms-other.txt | 3641 +++++++++++++++++ .../wwwroot/llmstxt/llms-select.txt | 807 ++++ .../wwwroot/llmstxt/llms-table.txt | 393 ++ .../wwwroot/llmstxt/llms-treeview.txt | 198 + .../wwwroot/llmstxt/llms.txt | 145 + tools/LlmsDocsGenerator/ComponentAnalyzer.cs | 387 ++ tools/LlmsDocsGenerator/ComponentInfo.cs | 139 + tools/LlmsDocsGenerator/DocsGenerator.cs | 259 ++ .../LlmsDocsGenerator.csproj | 16 + tools/LlmsDocsGenerator/MarkdownBuilder.cs | 374 ++ tools/LlmsDocsGenerator/Program.cs | 60 + 23 files changed, 8794 insertions(+), 1 deletion(-) create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-example-project.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt create mode 100644 src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt create mode 100644 tools/LlmsDocsGenerator/ComponentAnalyzer.cs create mode 100644 tools/LlmsDocsGenerator/ComponentInfo.cs create mode 100644 tools/LlmsDocsGenerator/DocsGenerator.cs create mode 100644 tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj create mode 100644 tools/LlmsDocsGenerator/MarkdownBuilder.cs create mode 100644 tools/LlmsDocsGenerator/Program.cs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6060be9b53..06b6afde537 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,3 +52,7 @@ jobs: - name: Check Localizer run: | dotnet test test/UnitTest.Localization + + - name: Check LLM Documentation + run: | + dotnet run --project tools/LlmsDocsGenerator -- --check diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 495bf5c33e4..422d2fe9e0a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,6 +13,16 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Generate LLM Documentation + run: | + dotnet run --project tools/LlmsDocsGenerator + - name: Login to Docker Hub uses: docker/login-action@v3 with: diff --git a/.gitignore b/.gitignore index af462e33ff0..785fb1080ef 100644 --- a/.gitignore +++ b/.gitignore @@ -379,3 +379,6 @@ src/**/wwwroot/**/uploader # css **/BootstrapBlazor/wwwroot/css/bootstrap.blazor.bundle.*.css + +# Code Agents +.claude diff --git a/README.md b/README.md index 0fada1c6027..7950f03b82d 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,64 @@ dotnet new install Bootstrap.Blazor.Templates::* dotnet new bbapp ``` +## For AI Code Agents + +This project includes LLM-friendly documentation to help AI coding assistants (Claude Code, Cursor, GitHub Copilot, etc.) generate correct component usage. + +### Online Access + +Documentation files are available at: `https://www.blazor.zone/llmstxt/` + +| File | URL | +|------|-----| +| Index | https://www.blazor.zone/llmstxt/llms.txt | +| Table | https://www.blazor.zone/llmstxt/llms-table.txt | +| Input | https://www.blazor.zone/llmstxt/llms-input.txt | +| Select | https://www.blazor.zone/llmstxt/llms-select.txt | +| Button | https://www.blazor.zone/llmstxt/llms-button.txt | +| Dialog | https://www.blazor.zone/llmstxt/llms-dialog.txt | +| Nav | https://www.blazor.zone/llmstxt/llms-nav.txt | +| Card | https://www.blazor.zone/llmstxt/llms-card.txt | +| TreeView | https://www.blazor.zone/llmstxt/llms-treeview.txt | +| Form | https://www.blazor.zone/llmstxt/llms-form.txt | +| Other | https://www.blazor.zone/llmstxt/llms-other.txt | + +### Using in Your Project + +Create a `llms.txt` in your project root to reference BootstrapBlazor documentation. + +See the full example template: https://www.blazor.zone/llmstxt/llms-example-project.txt + +Quick example: + +```markdown +# My Project + +## Dependencies + +### BootstrapBlazor +- NuGet: BootstrapBlazor +- Documentation: https://www.blazor.zone/llmstxt/llms.txt +- Source Code: https://github.com/dotnetcore/BootstrapBlazor + +For component parameters and usage: +- Table: https://www.blazor.zone/llmstxt/llms-table.txt +- Dialog: https://www.blazor.zone/llmstxt/llms-dialog.txt +- ... (add others as needed) +``` + +### Regenerate Documentation + +```bash +dotnet run --project tools/LlmsDocsGenerator +``` + +### Check Documentation Freshness + +```bash +dotnet run --project tools/LlmsDocsGenerator -- --check +``` + ## Contribution 1. Fork 2. Create Feat_xxx branch diff --git a/src/BootstrapBlazor.Server/Dockerfile b/src/BootstrapBlazor.Server/Dockerfile index 881334f77dc..94484792665 100644 --- a/src/BootstrapBlazor.Server/Dockerfile +++ b/src/BootstrapBlazor.Server/Dockerfile @@ -15,7 +15,11 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build WORKDIR / COPY . . -WORKDIR "src/BootstrapBlazor.Server" +# Generate LLM documentation +WORKDIR /tools/LlmsDocsGenerator +RUN dotnet run + +WORKDIR "/src/BootstrapBlazor.Server" FROM build AS publish RUN dotnet build RUN dotnet publish -c Release -o /app diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt new file mode 100644 index 00000000000..9161f142a82 --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt @@ -0,0 +1,572 @@ +# BootstrapBlazor Button Components + +> Auto-generated parameter reference for button components + +## Components + +- [Button](#button) +- [ButtonBase](#buttonbase) +- [ButtonUpload](#buttonupload) +- [DialButton](#dialbutton) +- [FilterButton](#filterbutton) +- [FullScreenButton](#fullscreenbutton) +- [GoTop](#gotop) +- [NavbarToggleButton](#navbartogglebutton) +- [PopConfirmButton](#popconfirmbutton) +- [PopConfirmButtonBase](#popconfirmbuttonbase) +- [PopConfirmButtonContent](#popconfirmbuttoncontent) +- [PrintButton](#printbutton) +- [PulseButton](#pulsebutton) +- [SlideButton](#slidebutton) +- [SwitchButton](#switchbutton) +- [TabToolbarButton](#tabtoolbarbutton) +- [ToggleButton](#togglebutton) +- [ToolbarButtonGroup](#toolbarbuttongroup) +- [TreeViewToolbarEditButton](#treeviewtoolbareditbutton) + +## Button + +Button 按钮组件 + +**Inherits from**: `ButtonBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsAutoFocus | `bool` | - | 获得/设置 是否自动获取焦点 默认 false 不自动获取焦点 | + + + +### Public Methods + +- `ValueTask FocusAsync()` + - 自动获得焦点方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Button/Button.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/Button.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Buttons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor) + +## ButtonBase + +Button 按钮组件 + +**Inherits from**: `TooltipWrapperBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ButtonStyle | `ButtonStyle` | - | 获得/设置 按钮风格枚举 | +| ButtonType | `ButtonType` | ButtonType.Button | 获得/设置 按钮类型 Submit 为表单提交按钮 Reset 为表单重置按钮 默认为 Button | +| ChildContent | `RenderFragment?` | - | 获得/设置 RenderFragment 实例 | +| Color | `Color` | Color.Primary | 获得/设置 按钮颜色 默认 | +| Icon | `string?` | - | 获得/设置 显示图标 | +| IsAsync | `bool` | - | 获得/设置 是否为异步按钮,默认为 false 如果为 true 表示是异步按钮,点击按钮后禁用自身并且等待异步完成,过程中显示 loading 动画 | +| IsBlock | `bool` | - | 获得/设置 Block 模式 | +| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | +| IsKeepDisabled | `bool` | - | 获得/设置 是否异步结束后是否保持禁用状态,默认为 false | +| IsOutline | `bool` | - | 获得/设置 Outline 样式 默认 false | +| LoadingIcon | `string?` | - | 获得/设置 正在加载动画图标 默认为 fa-solid fa-spin fa-spinner | +| OnClickWithoutRender | `Func + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| OnClick | `EventCallbackButtonUpload Component + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BrowserButtonClass | `string?` | - | 获得/设置 上传按钮样式 默认 null 使用 Button 默认 Color Primary | +| BrowserButtonColor | `Color` | Color.Primary | 获得/设置 浏览按钮颜色 | +| BrowserButtonIcon | `string?` | - | 获得/设置 浏览按钮图标 | +| BrowserButtonText | `string?` | - | 获得/设置 浏览按钮显示文字 | +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件内容 | +| InvalidStatusIcon | `string?` | - | 获得/设置 上传失败状态图标 | +| LoadingIcon | `string?` | - | 获得/设置 浏览按钮加载中图标 | +| OnGetFileFormat | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Upload/ButtonUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/ButtonUpload.razor.cs) + +## DialButton + +拨号按钮组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ButtonTemplate | `RenderFragment?` | - | 按钮模板 | +| ChildContent | `RenderFragment?` | - | 数据项模板 | +| Color | `Color` | Color.Primary | 获得/设置 按钮颜色 | +| DialMode | `DialMode` | - | 获得/设置 呈现方式 默认为 直线 | +| Duration | `int` | 400 | 获得/设置 动画延时 默认 400 单位 ms 毫秒 | +| Icon | `string?` | - | 获得/设置 显示图标 | +| IsAutoClose | `bool` | true | 获得/设置 是否自动关闭弹窗 默认为 true | +| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | +| Items | `IEnumerable 时扇形分布半径值 默认 75; | +| Size | `Size` | - | 获得/设置 Size 大小 | +| OnClick | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| OnClick | `EventCallback` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ClearIcon | `string?` | - | 获得/设置 重置按钮图标 | +| FilterIcon | `string?` | - | 获得/设置 过滤按钮图标 | +| OnClearFilter | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/FilterButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/FilterButton.razor.cs) + +## FullScreenButton + +FullScreenButton 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| FullScreenExitIcon | `string?` | - | 获得/设置 退出全屏图标 默认 fa-solid fa-compress | +| TargetId | `string?` | - | 获得/设置 全屏元素 Id 默认为 null | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/FullScreen/FullScreenButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/FullScreen/FullScreenButton.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/FullScreenButtons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/FullScreenButtons.razor) + +## GoTop + +GoTop 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Icon | `string?` | - | 获得/设置 返回顶端 Icon 属性 | +| ScrollBehavior | `ScrollIntoViewBehavior` | - | 获得/设置 滚动行为 默认 ScrollIntoViewBehavior.Smooth | +| Target | `string?` | - | 获得/设置 滚动条所在组件 | +| TooltipText | `string?` | - | 获得/设置 鼠标悬停提示文字信息 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/GoTop/GoTop.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/GoTop/GoTop.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/GoTops.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/GoTops.razor) + +## NavbarToggleButton + +NavbarToggleButton 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | +| Target | `string?` | - | 获得/设置 联动组件选择器 默认 null | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Navbar/NavbarToggleButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarToggleButton.razor.cs) + +## PopConfirmButton + +PopConfirmButton 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Color | `Color` | Color.None | 获得/设置 按钮颜色 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.cs) + +## PopConfirmButtonBase + +确认弹窗按钮组件 + +**Inherits from**: `ButtonBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BodyTemplate | `RenderFragment?` | - | 获得/设置 自定义内容 | +| CloseButtonColor | `Color` | Color.Secondary | 获得/设置 确认按钮颜色 | +| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮显示图标 | +| CloseButtonText | `string?` | - | 获得/设置 关闭按钮显示文字 默认为 关闭 | +| ConfirmButtonColor | `Color` | Color.Primary | 获得/设置 确认按钮颜色 | +| ConfirmButtonIcon | `string?` | - | 获得/设置 确认按钮显示图标 | +| ConfirmButtonText | `string?` | - | 获得/设置 确认按钮显示文字 默认为 确定 | +| ConfirmIcon | `string?` | - | 获得/设置 确认框图标 | +| Content | `string?` | - | 获得/设置 显示文字 | +| CustomClass | `string?` | - | 获得/设置 自定义样式 默认 null | +| IsLink | `bool` | - | 获得/设置 是否为 A 标签 默认 false 使用 button 渲染 | +| OnBeforeClick | `Func | +| ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 | +| ShowConfirmButton | `bool` | true | 获得/设置 是否显示确认按钮 | +| ShowShadow | `bool` | true | 获得/设置 是否显示阴影 默认 true | +| Title | `string?` | - | 获得/设置 显示标题 | +| Trigger | `string?` | - | 获得/设置 弹窗触发方式 默认 click 可设置 hover focus | + + + +### Public Methods + +- `Task TriggerCloseCallback()` + - Trigger OnClose event callback. + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs) + +## PopConfirmButtonContent + +Popover Confirm 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 自定义组件 | +| CloseButtonColor | `Color` | Color.Secondary | 获得/设置 确认按钮颜色 | +| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮显示图标 | +| CloseButtonText | `string?` | - | 获得/设置 关闭按钮显示文字 | +| ConfirmButtonColor | `Color` | Color.Primary | 获得/设置 确认按钮颜色 | +| ConfirmButtonIcon | `string?` | - | 获得/设置 确认按钮显示图标 | +| ConfirmButtonText | `string?` | - | 获得/设置 确认按钮显示文字 | +| Content | `string?` | - | 获得/设置 显示文字 | +| Icon | `string?` | - | 获得/设置 确认框图标 | +| OnClose | `Func + +### Public Methods + +- `Task OnCloseClick()` + - 点击关闭按钮调用此方法 +- `Task OnConfirmClick()` + - 点击确认按钮调用此方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs) + +## PrintButton + +PrintButton 打印按钮 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| PreviewUrl | `string?` | - | 获得/设置 预览模板地址 默认为空 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Print/PrintButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs) + +## PulseButton + +PulseButton 按钮组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ImageUrl | `string?` | - | 获得/设置 显示图片地址 默认为 null | +| PulseColor | `Color` | Color.Warning | 获得/设置 心跳环颜色 默认 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Button/PulseButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/PulseButton.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/PulseButtons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/PulseButtons.razor) + +## SlideButton + +SlideButton 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BodyTemplate | `RenderFragment?` | - | 获得/设置 展开部分模板 | +| ButtonItemTemplate | `RenderFragment + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| OnClick | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| OffText | `string?` | - | 获得/设置 Off 状态显示文字 | +| OnText | `string?` | - | 获得/设置 On 状态显示文字 | +| ToggleState | `bool` | - | 获得/设置 当前状态 | +| OnClick | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| OnClick | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Icon | `string?` | - | Gets or sets the button icon string. Default is null. | +| OnClickAsync | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Tab/TabToolbarButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tab/TabToolbarButton.razor.cs) + +## ToggleButton + +Toggle Button 按钮组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsActive | `bool` | - | 获得/设置 当前状态是否为激活状态 默认 false | +| OnToggleAsync | `Func + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| IsActiveChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Toolbar/ToolbarButtonGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toolbar/ToolbarButtonGroup.razor.cs) + +## TreeViewToolbarEditButton + +TreeViewToolbarEditButton component + +### Type Parameters + +- `TItem` - Generic type parameter + +**Inherits from**: `ComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Icon | `string?` | - | Gets or sets the icon of the edit button. Default is null. | +| Item | `TreeViewItemIf return true will update the tree text value, otherwise will not update. | +| Text | `string?` | - | Gets or sets the text of the popup-window label. Default is null. | +| Title | `string?` | - | Gets or sets the title of the popup-window. Default is null. | +| ItemChanged | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ItemChanged | `EventCallback + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt new file mode 100644 index 00000000000..8141e6d2e66 --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt @@ -0,0 +1,128 @@ +# BootstrapBlazor Container Components + +> Auto-generated parameter reference for card components + +## Components + +- [Card](#card) +- [CardUpload](#cardupload) +- [Collapse](#collapse) +- [GroupBox](#groupbox) + +## Card + +Card 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BodyTemplate | `RenderFragment?` | - | 获得/设置 BodyTemplate 模板 | +| Collapsed | `bool` | - | 获得/设置 是否收缩 默认 false 展开 | +| CollapseIcon | `string?` | - | 获得/设置 收缩展开箭头图标 默认 fa-solid fa-circle-chevron-right | +| Color | `Color` | - | 获得/设置 Card 颜色 | +| FooterTemplate | `RenderFragment?` | - | 获得/设置 FooterTemplate 模板 | +| HeaderPaddingY | `string?` | - | 获得/设置 Card Header 高度 padding Y轴值 默认 null 单位需自行给定 如 0.25rem | +| HeaderTemplate | `RenderFragment?` | - | 获得/设置 CardHeard 模板 | +| HeaderText | `string?` | - | 获得/设置 HeaderTemplate 显示文本 | +| IsCenter | `bool` | - | 获得/设置 是否居中 默认 false | +| IsCollapsible | `bool` | - | 获得/设置 是否可收缩 默认 false | +| IsShadow | `bool` | - | 获得/设置 是否显示阴影 默认 false | +| CollapsedChanged | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| CollapsedChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ActionButtonTemplate | `RenderFragment + +### Source + +- Component: [src/BootstrapBlazor/Components/Upload/CardUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/CardUpload.razor.cs) + +## Collapse + +Collapse 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CollapseItems | `RenderFragment?` | - | 获得/设置 CollapseItems 模板 | +| IsAccordion | `bool` | - | 获得/设置 是否为手风琴效果 默认为 false | +| OnCollapseChanged | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Collapse/Collapse.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Collapse/Collapse.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Collapses.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Collapses.razor) + +## GroupBox + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| Title | `string?` | - | 获得/设置 Title 属性 默认为 null | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/GroupBox/GroupBox.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/GroupBox/GroupBox.razor.cs) + +--- + + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt new file mode 100644 index 00000000000..fa753efe4bc --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt @@ -0,0 +1,408 @@ +# BootstrapBlazor Dialog & Feedback Components + +> Auto-generated parameter reference for dialog components + +## Components + +- [DialogBase](#dialogbase) +- [Drawer](#drawer) +- [EditDialog](#editdialog) +- [IconDialog](#icondialog) +- [Message](#message) +- [Modal](#modal) +- [ModalDialog](#modaldialog) +- [ResultDialogFooter](#resultdialogfooter) +- [SearchDialog](#searchdialog) +- [Toast](#toast) +- [ToastContainer](#toastcontainer) + +## DialogBase + +Dialog 组件基类 + +### Type Parameters + +- `TModel` - Generic type parameter + +**Inherits from**: `BootstrapModuleComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BodyTemplate | `RenderFragment Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 | +| Model | `TModel?` | - | 获得/设置 EditModel 实例 | +| RowType | `RowType` | - | 获得/设置 设置行格式 默认 Row 布局 | +| ShowLabel | `bool` | - | 获得/设置 是否显示标签 | +| ShowUnsetGroupItemsOnTop | `bool` | - | 获得/设置 未分组编辑项布局位置 默认 false 在尾部 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Dialog/DialogBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/DialogBase.cs) + +## Drawer + +Drawer component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AllowResize | `bool` | - | 获得/设置 是否允许调整大小 默认 false | +| BodyContext | `object?` | - | 获得/设置 抽屉内容相关数据 多用于传值 | +| BodyScroll | `bool` | - | 获得/设置 抽屉显示时是否允许滚动 body 默认为 false 不滚动 | +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| Height | `string` | "290px" | 获得/设置 抽屉高度 上下布局时生效 | +| IsBackdrop | `bool` | - | 获得/设置 点击遮罩是否关闭抽屉 默认为 false | +| IsKeyboard | `bool` | - | 获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 false | +| IsOpen | `bool` | - | 获得/设置 抽屉是否打开 默认 false 未打开 | +| OnClickBackdrop | `Func + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| IsOpenChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 | +| CloseButtonText | `string?` | - | 获得/设置 获得/设置 重置按钮文本 | +| DisableAutoSubmitFormByEnter | `bool?` | - | 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 | +| FooterTemplate | `RenderFragment + +### Public Methods + +- `ValueTask ToggleLoading(bool state)` + - 显示/隐藏 Loading 遮罩 + +### Source + +- Component: [src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor) + +## IconDialog + +IconDialog Component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ButtonText | `string?` | - | 获得/设置 拷贝按钮显示文字 | +| CopiedTooltipText | `string?` | - | 获得/设置 拷贝成功提示文字 | +| IconName | `string?` | - | 获得/设置 Icon 名称 | +| LabelFullText | `string?` | - | 获得/设置 Label 显示文字 | +| LabelText | `string?` | - | 获得/设置 Label 显示文字 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Dialog/IconDialog.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/IconDialog.razor.cs) + +## Message + +Message 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Placement | `Placement` | Placement.Top | 获得/设置 显示位置 默认为 Top | + + + +### Public Methods + +- `void Clear(string id)` + - 清除 Message 方法 由 JSInvoke 触发 + - *[JSInvokable]* +- `ValueTask Dismiss(string id)` + - OnDismiss 回调方法 由 JSInvoke 触发 + - *[JSInvokable]* +- `void SetPlacement(Placement placement)` + - 设置 容器位置方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Message/Message.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Message/Message.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Messages.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Messages.razor) + +## Modal + +Modal component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | Gets or sets the child component | +| FirstAfterRenderCallbackAsync | `Func + +### Public Methods + +- `Task Close()` + - Method to close the current popup +- `Task CloseCallback()` + - Callback method when the popup has been closed, called by JSInvoke + - *[JSInvokable]* +- `void RegisterShownCallback(IComponent component, Func + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BodyContext | `object?` | - | 获得/设置 弹窗内容相关数据 多用于传值 | +| BodyTemplate | `RenderFragment?` | - | 获得/设置 ModalBody 组件 | +| Class | `string?` | - | 获得/设置 弹窗自定义样式 | +| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮显示图标 未设置时 使用 fa-solid fa-fw fa-xmark | +| CloseButtonText | `string?` | - | 获得/设置 关闭按钮显示文字 资源文件设置为 关闭 | +| ExportPdfButtonOptions | `ExportPdfButtonOptions?` | - | 获得/设置 导出 Pdf 按钮配置项 | +| FooterContentTemplate | `RenderFragment?` | - | Gets or sets the footer content template. Default is null. | +| FooterTemplate | `RenderFragment?` | - | 获得/设置 ModalFooter 组件 | +| FullScreenSize | `FullScreenSize` | - | 获得/设置 弹窗大小 默认为 | +| GetResultDialog | `Func true 时自动关闭弹窗 | +| PrintButtonColor | `Color` | Color.Primary | 获得/设置 打印按钮颜色 默认 Color.Primary | +| PrintButtonIcon | `string?` | - | 获得/设置 打印按钮图标 未设置 取当前图标主题下打印图标 | +| PrintButtonText | `string?` | - | 获得/设置 Header 中打印按钮显示文字 默认为资源文件中 打印 | +| RestoreWindowIcon | `string?` | - | 获得/设置 恢复按钮图标 | +| ResultTask | `TaskCompletionSource 实例 默认 null | +| SaveButtonIcon | `string?` | - | 获得/设置 保存按钮显示图标 未设置时 使用主题图标 | +| SaveButtonText | `string?` | - | 获得/设置 保存按钮显示文字 资源文件设置为 保存 | +| ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 默认为 true 显示 | +| ShowExportPdfButton | `bool` | - | 获得/设置 是否显示导出 Pdf 按钮 默认为 false 不显示 | +| ShowExportPdfButtonInHeader | `bool` | - | 获得/设置 Header 中是否显示导出 Pdf 按钮 默认 false 不显示 | +| ShowFooter | `bool` | true | 获得/设置 是否显示 Footer 默认为 true | +| ShowHeader | `bool` | true | 获得/设置 是否显示 Header 默认为 true | +| ShowHeaderCloseButton | `bool` | true | 获得/设置 是否显示 Header 关闭按钮 | +| ShowMaximizeButton | `bool` | - | 获得/设置 是否显示最大化按钮 默认为 false | +| ShowPrintButton | `bool` | - | 获得/设置 是否显示打印按钮 默认为 false 不显示 | +| ShowPrintButtonInHeader | `bool` | - | 获得/设置 Header 中是否显示打印按钮 默认 false 不显示 | +| ShowResize | `bool` | - | 获得/设置 是否可以 Resize 弹窗 默认 false | +| ShowSaveButton | `bool` | - | 获得/设置 是否显示保存按钮 默认为 false 不显示 | +| Size | `Size` | Size.ExtraExtraLarge | 获得/设置 弹窗大小 默认为 | +| Title | `string?` | - | 获得/设置 弹窗标题 | + + + +### Public Methods + +- `Task HandlerException(Exception ex, RenderFragment +- `void SetHeaderText(string text)` + - 设置 Header 文字方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs) + +## ResultDialogFooter + +ResultDialog 对话框类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ButtonNoColor | `Color` | Color.Danger | 取消按钮颜色 | +| ButtonNoIcon | `string?` | - | 取消按钮图标 | +| ButtonNoText | `string?` | - | 取消按钮文本 | +| ButtonYesColor | `Color` | Color.Primary | 确认按钮颜色 | +| ButtonYesIcon | `string?` | - | 确认按钮图标 | +| ButtonYesText | `string?` | - | 确认按钮文本 | +| ShowNoButton | `bool` | true | 显示取消按钮 | +| ShowYesButton | `bool` | true | 显示确认按钮 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Dialog/ResultDialogFooter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/ResultDialogFooter.razor.cs) + +## SearchDialog + +查询弹窗组件 + +### Type Parameters + +- `TModel` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ClearIcon | `string?` | - | 获得/设置 清空按钮图标 | +| OnResetSearchClick | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Dialog/SearchDialog.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/SearchDialog.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/SearchDialogs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SearchDialogs.razor) + +## Toast + +ToastBox 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Options | `ToastOption?` | - | 获得/设置 ToastOption 实例 **[Required]** | + + + +### Public Methods + +- `Task Close()` + - 清除 ToastBox 方法 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Toast/Toast.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toast/Toast.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Toasts.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Toasts.razor) + +## ToastContainer + +Toast 弹出窗组件 + +**Inherits from**: `IDisposable` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Placement | `Placement` | - | 获得/设置 显示文字 | + + + +### Public Methods + +- `Task Close(ToastOption option)` + - 关闭弹窗 +- `void Dispose()` + - Dispose 方法 +- `void SetPlacement(Placement placement)` + - 设置 Toast 容器位置方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Toast/ToastContainer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toast/ToastContainer.razor.cs) + +--- + + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-example-project.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-example-project.txt new file mode 100644 index 00000000000..ad392d8efff --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-example-project.txt @@ -0,0 +1,150 @@ +# Example: Using BootstrapBlazor LLM Documentation in Your Project + +This file demonstrates how to create a `llms.txt` for your own project that references BootstrapBlazor documentation. + +## How to Use + +1. Copy the template below to your project root as `llms.txt` +2. Customize the project name and description +3. Add or remove component references based on what you use +4. AI Code Agents will read this file to understand your project's dependencies + +--- + +## Template (copy below this line) + +```markdown +# MyProject + +> Brief description of your project + +## Tech Stack + +- .NET 8.0 +- Blazor Server/WebAssembly +- BootstrapBlazor UI Library + +## Dependencies + +### BootstrapBlazor + +Enterprise-class Blazor UI component library based on Bootstrap 5. + +- NuGet: `dotnet add package BootstrapBlazor` +- Official Site: https://www.blazor.zone +- GitHub: https://github.com/dotnetcore/BootstrapBlazor + +#### Component Documentation + +For accurate component parameters and usage, refer to these files: + +| Category | Documentation URL | +|----------|-------------------| +| Index | https://www.blazor.zone/llmstxt/llms.txt | +| Table | https://www.blazor.zone/llmstxt/llms-table.txt | +| Input | https://www.blazor.zone/llmstxt/llms-input.txt | +| Select | https://www.blazor.zone/llmstxt/llms-select.txt | +| Button | https://www.blazor.zone/llmstxt/llms-button.txt | +| Dialog | https://www.blazor.zone/llmstxt/llms-dialog.txt | +| Nav | https://www.blazor.zone/llmstxt/llms-nav.txt | +| Card | https://www.blazor.zone/llmstxt/llms-card.txt | +| TreeView | https://www.blazor.zone/llmstxt/llms-treeview.txt | +| Form | https://www.blazor.zone/llmstxt/llms-form.txt | +| Other | https://www.blazor.zone/llmstxt/llms-other.txt | + +#### Quick Start + +```csharp +// Program.cs +builder.Services.AddBootstrapBlazor(); +``` + +```razor +@* _Imports.razor *@ +@using BootstrapBlazor.Components +``` + +```html + + + +``` + +#### Common Components Used in This Project + + +- Table: Data display with sorting, filtering, paging +- ValidateForm: Form validation +- Modal/Dialog: Popup dialogs +- Toast: Notifications +- Menu: Navigation + +## Project Structure + +``` +src/ +├── Components/ # Blazor components +├── Pages/ # Page components +├── Services/ # Business logic +└── Models/ # Data models +``` + +## Coding Conventions + +- Use BootstrapBlazor components for all UI elements +- Follow component documentation for correct parameter usage +- Use ValidateForm for all form submissions +- Use DialogService for modal dialogs +``` + +--- + +## Notes for AI Code Agents + +When generating code for projects using BootstrapBlazor: + +1. **Always fetch the documentation** before generating component code +2. **Check parameter names and types** - they may differ from other UI libraries +3. **Use the correct event callbacks** - BootstrapBlazor uses specific callback patterns +4. **Refer to source code** when documentation is insufficient - GitHub links are provided + +## Example Usage Patterns + +### Table with CRUD + +```razor + + + + + +
+``` + +### Form Validation + +```razor + + + + + +``` + +### Dialog Service + +```csharp +await DialogService.Show(new DialogOption() +{ + Title = "Confirm", + BodyTemplate = builder => builder.AddContent(0, "Are you sure?"), + OnCloseAsync = async () => { /* handle close */ } +}); +``` diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt new file mode 100644 index 00000000000..46be5388fd4 --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt @@ -0,0 +1,101 @@ +# BootstrapBlazor Form Components + +> Auto-generated parameter reference for form components + +## Components + +- [EditorForm](#editorform) +- [ValidateForm](#validateform) + +## EditorForm + +编辑表单基类 + +### Type Parameters + +- `TModel` - Generic type parameter + +**Inherits from**: `IShowLabel` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoGenerateAllItem | `bool` | true | 获得/设置 是否自动生成模型的所有属性 默认为 true 生成所有属性 | +| Buttons | `RenderFragment?` | - | 获得/设置 按钮模板 | +| ColumnOrderCallback | `Func 时本参数不生效 | +| IsDisplay | `bool` | - | 获得/设置 是否显示为 Display 组件 默认为 false | +| IsRenderWhenValueChanged | `bool` | - | 获得/设置 当值变化时是否重新渲染组件 默认 false | +| IsShowDisplayTooltip | `bool` | - | 获得/设置 是否显示 Display 组件的 Tooltip 默认为 false | +| ItemChangedType | `ItemChangedType` | - | 获得/设置 实体类编辑模式 Add 还是 Update | +| Items | `IEnumerable 模板不生效 | +| ItemsPerRow | `int?` | - | 获得/设置 每行显示组件数量 默认为 null | +| LabelAlign | `Alignment` | - | 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 | +| LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | +| Model | `TModel?` | - | 获得/设置 绑定模型 | +| PlaceHolderText | `string?` | - | 获得/设置 默认占位符文本 默认 null | +| RowType | `RowType` | - | 获得/设置 设置行格式 默认 Row 布局 | +| ShowLabel | `bool?` | - | 获得/设置 是否显示前置标签 默认为 null 未设置时默认显示标签 | +| ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null | +| ShowUnsetGroupItemsOnTop | `bool` | - | 获得/设置 未设置 GroupName 编辑项是否放置在顶部 默认 false | + + + +### Public Methods + +- `void Dispose()` + - + +### Source + +- Component: [src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor) + +## ValidateForm + +ValidateForm 组件类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | Specifies the content to be rendered inside this | +| DisableAutoSubmitFormByEnter | `bool?` | - | 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 | +| IsFormless | `bool` | - | 获得/设置 是否为无表单模式 默认 false | +| LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | +| Model | `object?` | - | Specifies the top-level model object for the form. An edit context will be constructed for this model. If using this parameter, do not also supply a value for . | +| OnFieldValueChanged | `Action is determined to be invalid. | +| OnValidSubmit | `Func is determined to be valid. | +| ShowAllInvalidResult | `bool` | - | 获得/设置 是否显示所有验证失败字段的提示信息 默认 false 仅显示第一个验证失败字段的提示信息 | +| ShowLabel | `bool?` | - | 获得/设置 是否显示验证表单内的 Label 默认为 null | +| ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null | +| ShowRequiredMark | `bool` | true | 获得/设置 是否获取必填项标记 默认为 true 显示 | +| ValidateAllProperties | `bool` | - | 获得/设置 是否验证所有字段 默认 false | + + + +### Public Methods + +- `void NotifyFieldChanged(FieldIdentifier fieldIdentifier, object? value)` + - 通知属性改变方法 +- `Task SetError(Expression + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt new file mode 100644 index 00000000000..4d7c87b8290 --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt @@ -0,0 +1,265 @@ +# BootstrapBlazor Input Components + +> Auto-generated parameter reference for input components + +## Components + +- [BootstrapInput](#bootstrapinput) +- [BootstrapInputBase](#bootstrapinputbase) +- [BootstrapInputEventBase](#bootstrapinputeventbase) +- [BootstrapInputGroup](#bootstrapinputgroup) +- [BootstrapInputGroupIcon](#bootstrapinputgroupicon) +- [BootstrapInputNumber](#bootstrapinputnumber) +- [InputUpload](#inputupload) +- [OtpInput](#otpinput) +- [Textarea](#textarea) + +## BootstrapInput + +BootstrapInput 组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoSetDefaultWhenNull | `bool` | - | 获得/设置 用户删除后是否自动更改为默认值 0 默认 false | +| ClearIcon | `string?` | - | 获得/设置 清空小按钮图标 默认 null | +| IsClearable | `bool` | - | 获得/设置 是否显示清空小按钮 默认 false | +| OnClear | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Input/BootstrapInput.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInput.razor.cs) + +## BootstrapInputBase + +Base class for BootstrapInput components + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `ValidateBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Color | `Color` | Color.None | Gets or sets the button color | +| FormatString | `string?` | - | Gets or sets the format string, e.g., "yyyy-MM-dd" for date types | +| Formatter | `Func + +### Public Methods + +- `Task EnterCallback()` + - Client-side EnterCallback method + - *[JSInvokable]* +- `Task EscCallback()` + - Client-side EscCallback method + - *[JSInvokable]* +- `Task FocusAsync()` + - Method to focus the element +- `ValueTask SelectAllTextAsync()` + - Method to select all text + +### Source + +- Component: [src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs) + +## BootstrapInputEventBase + +输入框基类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `BootstrapInputBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| UseInputEvent | `bool` | - | 获得/设置 是否在文本框输入值时触发 bind-value:event="oninput" 默认 false | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Input/BootstrapInputEventBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInputEventBase.cs) + +## BootstrapInputGroup + +BootstrapInputGroup 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Input/BootstrapInputGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInputGroup.razor.cs) + +## BootstrapInputGroupIcon + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Icon | `string?` | - | | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Input/BootstrapInputGroupIcon.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInputGroupIcon.razor.cs) + +## BootstrapInputNumber + +An input component for editing numeric values. Supported numeric types are , , , , , . + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Max | `string?` | - | 获得/设置 最大值 | +| Min | `string?` | - | 获得/设置 最小值 | +| MinusIcon | `string?` | - | 获得/设置 减小数值图标 | +| OnDecrement | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumber.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumber.razor.cs) + +## InputUpload + +InputUpload 组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BrowserButtonClass | `string` | "btn-primary" | 获得/设置 上传按钮样式 默认 btn-primary | +| BrowserButtonIcon | `string?` | - | 获得/设置 浏览按钮图标 | +| BrowserButtonText | `string?` | - | 获得/设置 浏览按钮显示文字 | +| DeleteButtonClass | `string` | "btn-danger" | 获得/设置 删除按钮样式 默认 btn-danger | +| DeleteButtonIcon | `string?` | - | 获得/设置 删除按钮图标 | +| DeleteButtonText | `string?` | - | 获得/设置 重置按钮显示文字 | +| PlaceHolder | `string?` | - | 获得/设置 PlaceHolder 占位符文本 | +| ShowDeleteButton | `bool` | - | 获得/设置 是否显示删除按钮 默认为 false 不显示 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Upload/InputUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/InputUpload.razor.cs) + +## OtpInput + +OTP input component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Digits | `int` | 6 | Gets or sets the length of the OTP input. Default is 6. | +| IsReadonly | `bool` | - | Gets or sets whether the OTP input is readonly. Default is false. | +| PlaceHolder | `string?` | - | Gets or sets the placeholder of the OTP input. Default is null. | +| Type | `OtpInputType` | - | Gets or sets the value type of the OTP input. Default is . | + + + +### Public Methods + +- `Task TriggerSetValue(string val)` + - Trigger value changed event callback. Trigger by JavaScript. + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Input/OtpInput.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/OtpInput.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/OtpInputs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/OtpInputs.razor) + +## Textarea + +Textarea component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsAutoScroll | `bool` | - | Gets or sets whether auto-scroll is enabled. Default is false. | +| UseShiftEnter | `bool` | - | Gets or sets whether Shift + Enter replaces the default Enter key behavior. Default is false. | + + + +### Public Methods + +- `Task ScrollTo(int value)` + - Scroll to a specific value +- `Task ScrollToBottom()` + - Scroll to the bottom +- `Task ScrollToTop()` + - Scroll to the top + +### Source + +- Component: [src/BootstrapBlazor/Components/Textarea/Textarea.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Textarea/Textarea.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/TextAreas.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/TextAreas.razor) + +--- + + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt new file mode 100644 index 00000000000..dfebcd31d2c --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt @@ -0,0 +1,671 @@ +# BootstrapBlazor Navigation Components + +> Auto-generated parameter reference for nav components + +## Components + +- [Anchor](#anchor) +- [AnchorLink](#anchorlink) +- [Breadcrumb](#breadcrumb) +- [ContextMenu](#contextmenu) +- [ContextMenuZone](#contextmenuzone) +- [GotoNavigator](#gotonavigator) +- [Menu](#menu) +- [MenuLink](#menulink) +- [Nav](#nav) +- [Navbar](#navbar) +- [NavbarBrand](#navbarbrand) +- [NavbarCollapse](#navbarcollapse) +- [NavbarGroup](#navbargroup) +- [NavbarItem](#navbaritem) +- [NavbarLink](#navbarlink) +- [RibbonTab](#ribbontab) +- [RibbonTabHeader](#ribbontabheader) +- [SideMenu](#sidemenu) +- [SkeletonAvatar](#skeletonavatar) +- [Step](#step) +- [SubMenu](#submenu) +- [Tab](#tab) +- [TabLink](#tablink) +- [TopMenu](#topmenu) + +## Anchor + +Anchor 组件部分类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子内容 | +| Container | `string?` | - | 获得/设置 滚动组件 Id 默认为 null 使用最近滚动条容器元素 | +| IsAnimation | `bool` | true | 获得/设置 滚动时是否开启动画 默认 true | +| Offset | `int` | - | 获得/设置 距离顶端偏移量 默认为 0 | +| Target | `string?` | - | 获得/设置 目标组件 Id | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Anchor/Anchor.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Anchor/Anchor.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Anchors.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Anchors.razor) + +## AnchorLink + +AnchorLink 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Icon | `string?` | - | 获得/设置 锚点图标 默认 fa-solid fa-link | +| Text | `string?` | - | 获得/设置 组件 Text 显示文字 | +| TooltipText | `string?` | - | 获得/设置 组件 拷贝成功后 显示文字 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/AnchorLink/AnchorLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/AnchorLink/AnchorLink.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor) + +## Breadcrumb + +Breadcrumb 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Value | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Breadcrumb/Breadcrumb.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Breadcrumb/Breadcrumb.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Breadcrumbs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Breadcrumbs.razor) + +## ContextMenu + +ContextMenu 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| OnBeforeShowCallback | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/ContextMenu/ContextMenu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ContextMenu/ContextMenu.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor) + +## ContextMenuZone + +ContextMenuZone 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/ContextMenu/ContextMenuZone.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ContextMenu/ContextMenuZone.razor.cs) + +## GotoNavigator + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| GotoText | `string?` | - | 获得/设置 跳转文本 默认 null | +| Index | `int` | - | 获得/设置 跳转页码 默认 null | +| OnNavigation | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Pagination/GotoNavigator.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Pagination/GotoNavigator.razor.cs) + +## Menu + +Menu 组件基类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| DisableNavigation | `bool` | - | 获得/设置 是否禁止导航 默认为 false 允许导航 | +| IndentSize | `int` | 16 | 获得/设置 缩进大小 默认为 16 单位 px | +| IsAccordion | `bool` | - | 获得/设置 是否为手风琴效果 默认为 false | +| IsBottom | `bool` | - | 获得/设置 侧边栏垂直模式在底部 默认 false | +| IsCollapsed | `bool` | - | 获得/设置 侧栏是否收起 默认 false 未收起 | +| IsExpandAll | `bool` | - | 获得/设置 是否全部展开 默认为 false | +| IsScrollIntoView | `bool` | true | 获得/设置 自动滚动到可视区域 默认 true 开启时生效 | +| IsVertical | `bool` | - | 获得/设置 侧栏垂直模式 默认 false | +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Menu/Menu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/Menu.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Menus.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Menus.razor) + +## MenuLink + +MenuLink 组件内部封装 NavLink 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ArrowIcon | `string?` | - | 获得/设置 ArrowIcon 图标 | +| Item | `MenuItem?` | - | 获得/设置 MenuItem 实例 不可为空 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Menu/MenuLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/MenuLink.razor.cs) + +## Nav + +NavMenu 组件基类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Alignment | `Alignment` | Alignment.Left | 获得/设置 组件对齐方式 | +| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 | +| IsFill | `bool` | - | 获得/设置 是否填充 | +| IsJustified | `bool` | - | 获得/设置 是否等宽 | +| IsPills | `bool` | - | 获得/设置 是否为胶囊 | +| IsVertical | `bool` | - | 获得/设置 是否垂直分布 | +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Nav/Nav.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Nav/Nav.razor.cs) + +## Navbar + +Navbar 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BackgroundColorCssClass | `string?` | - | 获得/设置 背景色样式名称 默认 null 未设置 | +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | +| Size | `Size` | Size.Medium | 获得/设置 组件大小 默认 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Navbar/Navbar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/Navbar.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Navbars.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Navbars.razor) + +## NavbarBrand + +NavBrand 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Navbar/NavbarBrand.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarBrand.razor.cs) + +## NavbarCollapse + +NavbarCollapse 组件用于在导航栏中适配响应式布局 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Navbar/NavbarCollapse.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarCollapse.razor.cs) + +## NavbarGroup + +NavbarGroup 组件用于在导航栏中分组 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | +| Height | `string?` | - | 获得/设置 高度值 默认 200px; | +| IsScrolling | `bool` | - | 获得/设置 是否启用滚动 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Navbar/NavbarGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarGroup.razor.cs) + +## NavbarItem + +NavbarItem 组件用于在导航栏中添加子组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Navbar/NavbarItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarItem.razor.cs) + +## NavbarLink + +NavbarLink 组件用于在导航栏中添加链接 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ImageCss | `string?` | - | The css class of img element default value null | +| ImageUrl | `string?` | - | 获得/设置 显示图片地址 默认为 null | +| Target | `string?` | - | 获得/设置 A 标签 target 参数 默认 null | +| Url | `string?` | - | 获得/设置 Url 默认为 # | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Navbar/NavbarLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarLink.razor.cs) + +## RibbonTab + +RibbonTab 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 内容模板 | +| DecodeAnchorCallback | `Func + +### Public Methods + +- `void Render()` + - 重新渲染组件 +- `void SetExpand()` + - SetExpand 方法 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/RibbonTab/RibbonTab.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/RibbonTab/RibbonTab.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/RibbonTabs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/RibbonTabs.razor) + +## RibbonTabHeader + +Header 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `IEnumerable + +### Public Methods + +- `void Render()` + - 重新渲染组件 +- `void SetExpand()` + - SetExpand 方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/RibbonTab/RibbonTabHeader.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/RibbonTab/RibbonTabHeader.razor.cs) + +## SideMenu + +SideMenu 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ArrowIcon | `string?` | - | 获得/设置 菜单箭头图标 | +| DropdownIcon | `string?` | - | 获得/设置 组件数据源 | +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Menu/SideMenu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/SideMenu.razor.cs) + +## SkeletonAvatar + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Circle | `bool` | - | 获得/设置 是否为圆形 默认为 false | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Skeleton/SkeletonAvatar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Skeleton/SkeletonAvatar.razor.cs) + +## Step + +Step 组件类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容实例 | +| FinishedTemplate | `RenderFragment?` | - | 获得/设置 步骤全部完成时模板 默认 null | +| IsVertical | `bool` | - | 获得/设置 是否垂直渲染 默认 false 水平渲染 | +| Items | `List + +### Public Methods + +- `void Add(StepOption option)` + - 添加步骤到组件中 +- `void Insert(int index, StepOption option)` + - 插入步骤到组件中 +- `Task + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ArrowIcon | `string?` | - | 获得/设置 菜单箭头图标 | +| DropdownIcon | `string?` | - | 获得/设置 组件数据源 | +| Item | `MenuItem?` | - | 获得/设置 组件数据源 | +| OnClick | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Menu/SubMenu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/SubMenu.razor.cs) + +## Tab + +Tab component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AdditionalAssemblies | `IEnumerable在向后移动标签页按钮前 | +| AllowDrag | `bool` | - | 获得/设置 是否允许拖放标题栏更改栏位顺序,默认为 false | +| BeforeContextMenuTemplate | `RenderFragment在向前移动标签页按钮前 | +| Body | `RenderFragment?` | - | 获得/设置 TabItems 模板 | +| ButtonTemplate | `RenderFragment 值 | +| ErrorLoggerToastTitle | `string?` | - | 获得/设置 错误日志 弹窗标题 默认 null | +| ExcludeUrls | `IEnumerable instance. Default is null. | +| TabStyle | `TabStyle` | - | Gets or sets the tab style. Default is . | +| ToolbarTemplate | `RenderFragment + +### Public Methods + +- `void ActiveTab(TabItem item)` + - 设置指定 TabItem 为激活状态 +- `void ActiveTab(int index)` + - 设置指定 TabItem 为激活状态 +- `void AddTab(string url, string text, string? icon, bool active, bool closable)` + - 通过 Url 添加 TabItem 标签方法 +- `void AddTab(Dictionary instance. + +### Source + +- Component: [src/BootstrapBlazor/Components/Tab/Tab.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tab/Tab.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Tabs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Tabs.razor) + +## TabLink + +Represents a link within a tab component. + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | Gets or sets the content of the component. Default is null | +| Closable | `bool` | true | Gets or sets a value indicating whether the tab item is closable. Default is true. | +| Icon | `string?` | - | Gets or sets the icon of the link. Default is null | +| OnClick | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Tab/TabLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tab/TabLink.razor.cs) + +## TopMenu + +顶栏菜单 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ArrowIcon | `string?` | - | 获得/设置 菜单箭头图标 | +| DropdownIcon | `string?` | - | 获得/设置 组件数据源 | +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Menu/TopMenu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/TopMenu.razor.cs) + +--- + + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt new file mode 100644 index 00000000000..3aca761ca3c --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt @@ -0,0 +1,3641 @@ +# BootstrapBlazor Other Components + +> Auto-generated parameter reference for other components + +## Components + +- [Affix](#affix) +- [Alert](#alert) +- [AlertBase](#alertbase) +- [AutoFill](#autofill) +- [Avatar](#avatar) +- [AvatarUpload](#avatarupload) +- [Badge](#badge) +- [BoolFilter](#boolfilter) +- [BootstrapBlazorIcon](#bootstrapblazoricon) +- [BootstrapBlazorRoot](#bootstrapblazorroot) +- [BootstrapComponentBase](#bootstrapcomponentbase) +- [BootstrapLabel](#bootstraplabel) +- [BootstrapLabelSetting](#bootstraplabelsetting) +- [Calendar](#calendar) +- [Camera](#camera) +- [Captcha](#captcha) +- [Carousel](#carousel) +- [Checkbox](#checkbox) +- [CheckboxList](#checkboxlist) +- [CheckboxListGeneric](#checkboxlistgeneric) +- [Circle](#circle) +- [CircleBase](#circlebase) +- [ClockPicker](#clockpicker) +- [ColorPicker](#colorpicker) +- [Console](#console) +- [ConsoleLogger](#consolelogger) +- [CountUp](#countup) +- [DatePickerBody](#datepickerbody) +- [DatePickerCell](#datepickercell) +- [DateTimeFilter](#datetimefilter) +- [DateTimePicker](#datetimepicker) +- [DateTimeRange](#datetimerange) +- [Display](#display) +- [DisplayBase](#displaybase) +- [Divider](#divider) +- [DropUpload](#dropupload) +- [Dropzone](#dropzone) +- [Empty](#empty) +- [EnumFilter](#enumfilter) +- [FileIcon](#fileicon) +- [FileListUploadBase](#filelistuploadbase) +- [FilterBase](#filterbase) +- [FilterLogicItem](#filterlogicitem) +- [FilterProvider](#filterprovider) +- [FlipClock](#flipclock) +- [FloatingLabel](#floatinglabel) +- [Footer](#footer) +- [Handwritten](#handwritten) +- [IdComponentBase](#idcomponentbase) +- [IFrame](#iframe) +- [ImagePreviewer](#imagepreviewer) +- [ImageViewer](#imageviewer) +- [IntersectionObserver](#intersectionobserver) +- [IntersectionObserverItem](#intersectionobserveritem) +- [Layout](#layout) +- [LayoutSplitBar](#layoutsplitbar) +- [Light](#light) +- [Link](#link) +- [ListGroup](#listgroup) +- [ListView](#listview) +- [LoadMore](#loadmore) +- [Logout](#logout) +- [LogoutLink](#logoutlink) +- [Marquee](#marquee) +- [MultiFilter](#multifilter) +- [NetworkMonitorIndicator](#networkmonitorindicator) +- [NotSupportFilter](#notsupportfilter) +- [NullSwitch](#nullswitch) +- [NumberFilter](#numberfilter) +- [Pagination](#pagination) +- [PaginationItem](#paginationitem) +- [Popover](#popover) +- [PopoverCompleteBase](#popovercompletebase) +- [Progress](#progress) +- [QueryBuilder](#querybuilder) +- [QueryGroup](#querygroup) +- [Radio](#radio) +- [RadioList](#radiolist) +- [RadioListGeneric](#radiolistgeneric) +- [Rate](#rate) +- [ReconnectorContent](#reconnectorcontent) +- [RenderTemplate](#rendertemplate) +- [Repeater](#repeater) +- [Row](#row) +- [Script](#script) +- [Scroll](#scroll) +- [Search](#search) +- [Segmented](#segmented) +- [ShieldBadge](#shieldbadge) +- [SkeletonBase](#skeletonbase) +- [Slider](#slider) +- [SpeechWave](#speechwave) +- [Spinner](#spinner) +- [Split](#split) +- [Stack](#stack) +- [StringFilter](#stringfilter) +- [SvgIcon](#svgicon) +- [SweetAlertBody](#sweetalertbody) +- [Switch](#switch) +- [ThemeProvider](#themeprovider) +- [Timeline](#timeline) +- [TimePicker](#timepicker) +- [TimePickerCell](#timepickercell) +- [Timer](#timer) +- [Toggle](#toggle) +- [ToggleBase](#togglebase) +- [Toolbar](#toolbar) +- [ToolbarItem](#toolbaritem) +- [Tooltip](#tooltip) +- [TooltipWrapperBase](#tooltipwrapperbase) +- [Transition](#transition) +- [Typed](#typed) +- [UploadBase](#uploadbase) +- [UploadPreviewList](#uploadpreviewlist) +- [ValidateBase](#validatebase) +- [Waterfall](#waterfall) +- [Watermark](#watermark) + +## Affix + +Affix 固钉组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 **[Required]** | +| Offset | `float` | - | 获得/设置 指定偏移量后触发 | +| Position | `AffixPosition` | - | 获得/设置 固定位置枚举 默认 | +| ZIndex | `int?` | - | 获得/设置 z-index 值 默认 100 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Affix/Affix.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Affix/Affix.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Affixs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Affixs.razor) + +## Alert + +Alert 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ShowBorder | `bool` | - | 获得/设置 是否显示边框 默认 false 不显示 | +| ShowShadow | `bool` | - | 获得/设置 是否显示阴影 默认 false 不显示 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Alert/Alert.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Alert/Alert.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Alerts.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor) + +## AlertBase + +Alert 警告框组件 + +**Inherits from**: `BootstrapComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 子组件 | +| Color | `Color` | Color.Primary | 获得/设置 颜色 | +| Icon | `string?` | - | 获得/设置 显示图标 | +| OnDismiss | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Alert/AlertBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Alert/AlertBase.cs) + +## AutoFill + +AutoFill component + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| DisplayCount | `int?` | - | Gets or sets the number of items to display when matching data. Default is null. | +| Icon | `string?` | - | Gets or sets the icon. | +| IgnoreCase | `bool` | true | Gets or sets whether to ignore case when matching. Default is true. | +| IsAutoClearWhenInvalid | `bool` | - | 获得/设置 输入框内容无效时是否自动清空内容 默认 false | +| IsLikeMatch | `bool` | - | Gets or sets whether to enable fuzzy search. Default is false. | +| IsVirtualize | `bool` | - | Gets or sets whether virtual scrolling is enabled. Default is false. | +| Items | `IEnumerable + +### Public Methods + +- `void TriggerChange(string v)` + - 由客户端 JavaScript 触发 + - *[JSInvokable]* +- `Task TriggerFilter(string val)` + - Triggers the filter method. + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor) + +## Avatar + +Avatar 头像框组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| GetUrlAsync | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Avatar/Avatar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Avatar/Avatar.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Avatars.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Avatars.razor) + +## AvatarUpload + +头像上传组件 AvatarUpload Component + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AddIcon | `string?` | - | 获得/设置 新建图标 | +| AllowExtensions | `List + +### Public Methods + +- `Task Preview()` + - 预览当前头像方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs) + +## Badge + +Badge component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | Gets or sets the child content of the component. Default is false. | +| Color | `Color` | Color.Primary | Gets or sets the color of the badge. Default is . | +| IsPill | `bool` | - | Gets or sets whether the badge should be displayed as a pill (rounded) or not. Default is false. | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Badge/Badge.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Badge/Badge.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Badges.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Badges.razor) + +## BoolFilter + +BoolFilter component is used for boolean value filtering in table column. + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/BoolFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/BoolFilter.razor.cs) + +## BootstrapBlazorIcon + +Icon 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| IsSvgSprites | `bool` | - | 获得/设置 是否为 svg sprites 默认 false | +| Name | `string?` | - | 获得/设置 图标名称 | +| Url | `string?` | - | 获得/设置 Svg Sprites 路径 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Icon/BootstrapBlazorIcon.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Icon/BootstrapBlazorIcon.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/BootstrapBlazorIcons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/BootstrapBlazorIcons.razor) + +## BootstrapBlazorRoot + +BootstrapBlazorRoot 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| EnableErrorLogger | `bool?` | - | 获得/设置 是否开启全局异常捕获 默认 null 读取配置文件 EnableErrorLogger 值 | +| OnErrorHandleAsync | `Func 设置值 | +| ToastTitle | `string?` | - | 获得/设置 Error Toast 弹窗标题 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/BaseComponents/BootstrapBlazorRoot.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/BaseComponents/BootstrapBlazorRoot.razor.cs) + +## BootstrapComponentBase + +Bootstrap Blazor 组件基类 + +**Inherits from**: `ComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AdditionalAttributes | `IDictionary + +### Source + +- Component: [src/BootstrapBlazor/Components/BaseComponents/BootstrapComponentBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/BaseComponents/BootstrapComponentBase.cs) + +## BootstrapLabel + +BootstrapLabel 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | +| ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示 | +| Value | `string?` | - | 获得/设置 组件值 显示文本 默认 null | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Label/BootstrapLabel.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Label/BootstrapLabel.razor.cs) + +## BootstrapLabelSetting + +BootstrapLabelSetting 组件类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Label/BootstrapLabelSetting.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Label/BootstrapLabelSetting.razor.cs) + +## Calendar + +日历框组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BodyTemplate | `RenderFragment 有效 | +| CellTemplate | `RenderFragment 时有效 | +| FirstDayOfWeek | `DayOfWeek` | DayOfWeek.Sunday | 获得/设置 星期第一天 默认 | +| HeaderTemplate | `RenderFragment?` | - | 获得/设置 列头模板 | +| OnValueChanged | `Func 月视图 | +| ValueChanged | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ValueChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoStart | `bool` | - | 获得/设置 是否自动开启摄像头 默认为 false | +| CaptureJpeg | `bool` | - | 获得/设置 拍照格式为 Jpeg 默认为 false 使用 png 格式 | +| DeviceId | `string?` | - | 获得/设置 当前设备 Id 默认 null | +| OnClose | `Func + +### Public Methods + +- `Task + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BarIcon | `string?` | - | 获得/设置 刷新按钮图标 默认值 fa-solid fa-arrow-right | +| BarText | `string?` | - | 获得/设置 Bar 显示文本 | +| Diameter | `int` | 9 | 获得/设置 拼图直径 | +| FailedText | `string?` | - | 获得/设置 Bar 显示文本 | +| GetImageName | `Func + +### Public Methods + +- `Task Reset()` + - 重置组件方法 +- `Task + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 要求使用 | +| DisableTouchSwiping | `bool` | - | 获得/设置 是否禁用移动端手势滑动 默认 false | +| HoverPause | `bool` | true | 获得/设置 鼠标悬停时是否暂停播放 默认 true | +| Images | `IEnumerable | +| PreviousIcon | `string?` | - | 获得/设置 上一页图标 | +| ShowControls | `bool` | true | 获得/设置 是否显示控制按钮 默认 true | +| ShowIndicators | `bool` | true | 获得/设置 是否显示指示标志 默认 true | +| Width | `string?` | - | 获得/设置 内部图片的宽度 | + + + +### Public Methods + +- `ValueTask TriggerSlideChanged(int index)` + - 幻灯片切换事件回调 由 JavaScript 调用 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Carousel/Carousel.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Carousel/Carousel.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Carousels.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Carousels.razor) + +## Checkbox + +Checkbox 组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `ValidateBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 RenderFragment 实例 | +| Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | +| OnBeforeStateChanged | `Func + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| StateChanged | `EventCallback 回调方法 +- `Task SetState(CheckboxState state)` + - 设置 复选框状态方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Checkbox/Checkbox.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Checkbox/Checkbox.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor) + +## CheckboxList + +CheckboxList 组件基类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `ValidateBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CheckboxItemClass | `string?` | - | 获得/设置 Checkbox 组件布局样式 | +| Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | +| IsButton | `bool` | - | 获得/设置 是否为按钮样式 默认 false | +| IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor) + +## CheckboxListGeneric + +CheckboxList 组件基类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `IModelEqualityComparer` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CheckboxItemClass | `string?` | - | 获得/设置 Checkbox 组件布局样式 | +| Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | +| CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 | +| IsButton | `bool` | - | 获得/设置 是否为按钮样式 默认 false | +| IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | +| Items | `IEnumerable提供此回调方法时忽略 属性 | +| OnMaxSelectedCountExceed | `Func + +### Public Methods + +- `bool Equals(TValue? x, TValue? y)` + - + +### Source + +- Component: [src/BootstrapBlazor/Components/Checkbox/CheckboxListGeneric.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Checkbox/CheckboxListGeneric.razor.cs) + +## Circle + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Value | `int` | - | 获得/设置 当前值 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Circle/Circle.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Circle/Circle.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Circles.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Circles.razor) + +## CircleBase + +Circle 组件基类 + +**Inherits from**: `BootstrapModuleComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| Color | `Color` | Color.Primary | 获得/设置 组件进度条颜色 | +| ShowProgress | `bool` | true | 获得/设置 是否显示进度百分比 默认显示 | +| StrokeWidth | `int` | 2 | 获得/设置 进度条宽度 默认为 2 | +| Width | `int` | 120 | 获得/设置 文件预览框宽度 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Circle/CircleBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Circle/CircleBase.cs) + +## ClockPicker + +ClockPicker 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsAutoSwitch | `bool` | true | 获得/设置 是否自动切换 小时、分钟、秒 自动切换 默认 true | +| ShowClockScale | `bool` | - | 获得/设置 是否显示表盘刻度 默认 false | +| ShowMinute | `bool` | true | 获得/设置 是否显示分钟 默认 true | +| ShowSecond | `bool` | true | 获得/设置 是否显示秒 默认 true | + + + +### Public Methods + +- `void SetTime(int hour, int minute, int second)` + - JSInvoke 调用此方法 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/ClockPicker/ClockPicker.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ClockPicker/ClockPicker.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/ClockPickers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ClockPickers.razor) + +## ColorPicker + +ColorPicker 颜色拾取器组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Formatter | `Func 开启时生效 默认 null | +| Template | `RenderFragment + +### Public Methods + +- `Task OnColorChanged(string value)` + - 选中颜色值变化时回调此方法 由 JavaScript 调用 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/ColorPicker/ColorPicker.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ColorPicker/ColorPicker.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor) + +## Console + +控制台消息组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoScrollText | `string?` | - | 获得/设置 自动滚屏显示文字 | +| ClearButtonColor | `Color` | Color.Secondary | 获得/设置 清除按钮颜色 默认值为 Color.Secondary | +| ClearButtonIcon | `string?` | - | 获得/设置 按钮 显示图标 默认值为 fa-solid fa-xmark | +| ClearButtonText | `string?` | - | 获得/设置 按钮 显示文字 默认值为 清屏 | +| FooterTemplate | `RenderFragment?` | - | 获得/设置 Footer 模板 | +| HeaderTemplate | `RenderFragment?` | - | 获得/设置 Header 模板 | +| HeaderText | `string?` | - | 获得/设置 Header 显示文字 默认值为 系统监控 | +| Height | `int` | - | 获得/设置 组件高度 默认为 126px; | +| IsAutoScroll | `bool` | true | 获得/设置 是否自动滚屏 默认 true | +| IsFlashLight | `bool` | true | 获得/设置 指示灯 是否闪烁 默认 true 闪烁 | +| Items | `IEnumerable + +### Public Methods + +- `Task OnClearConsole()` + - 清空控制台消息方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Console/Console.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Console/Console.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Consoles.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Consoles.razor) + +## ConsoleLogger + +Logger 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsHtml | `bool` | - | 获得/设置 是否为 Html 代码 默认 false | +| Max | `int` | 3 | 获得/设置 最大行数 默认 3 行 | + + + +### Public Methods + +- `void Log(string message)` + - 输入日志方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Console/ConsoleLogger.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Console/ConsoleLogger.razor.cs) + +## CountUp + +CountUp 组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| OnCompleted | `Func + +### Public Methods + +- `Task OnCompleteCallback()` + - OnCompleted 回调方法 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/CountUp/CountUp.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/CountUp/CountUp.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/CountUps.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor) + +## DatePickerBody + +日期选择组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoClose | `bool` | - | 获得/设置 点击日期时是否自动关闭弹窗 默认 false | +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | +| ClearButtonText | `string?` | - | 获得/设置 清空按钮文字 | +| ConfirmButtonText | `string?` | - | 获得/设置 确定按钮文字 | +| DateFormat | `string?` | - | 获得/设置 日期格式字符串 默认为 null | +| DatePlaceHolder | `string?` | - | 获得/设置 日期 PlaceHolder 字符串 | +| DateTimeFormat | `string?` | - | 获得/设置 日期时间格式字符串 默认为 null | +| DayDisabledTemplate | `RenderFragment | +| MaxValue | `DateTime?` | - | 获得/设置 当前日期最大值 | +| MinValue | `DateTime?` | - | 获得/设置 当前日期最小值 | +| NextMonthIcon | `string?` | - | 获得/设置 上一年图标 | +| NextYearIcon | `string?` | - | 获得/设置 上一年图标 | +| NowButtonText | `string?` | - | 获得/设置 此刻按钮文字 | +| OnClear | `Func 参数关闭 | +| PickTimeMode | `PickTimeMode` | PickTimeMode.Dropdown | 获得/设置 选择时间方式 默认使用 | +| PreviousMonthIcon | `string?` | - | 获得/设置 上一年图标 | +| PreviousYearIcon | `string?` | - | 获得/设置 上一年图标 | +| ShowClearButton | `bool` | - | 获得/设置 是否显示 Clear 按钮 默认 false 不显示 | +| ShowFestivals | `bool` | - | 获得/设置 是否显示节日 默认 false | +| ShowFooter | `bool` | - | 获得/设置 是否显示 Footer 区域 默认为 false 不显示 | +| ShowHolidays | `bool` | - | 获得/设置 是否显示休假日 默认 false | +| ShowLeftButtons | `bool` | true | 获得/设置 是否显示左侧控制按钮 默认显示 | +| ShowLunar | `bool` | - | 获得/设置 是否显示中国阴历历法 默认 false | +| ShowRightButtons | `bool` | true | 获得/设置 是否显示右侧控制按钮 默认显示 | +| ShowSidebar | `bool` | - | 获得/设置 是否显示快捷侧边栏 默认 false 不显示 | +| ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | +| SidebarTemplate | `RenderFragment + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ValueChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| OnClick | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/DateTimePicker/DatePickerCell.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DateTimePicker/DatePickerCell.razor.cs) + +## DateTimeFilter + +DataTime filter component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs) + +## DateTimePicker + +DateTimePicker 组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoClose | `bool` | true | 获得/设置 是否点击日期后自动关闭弹窗 默认 true | +| AutoToday | `bool` | true | 获得/设置 是否自动设置值为当前时间 默认 true | +| ButtonColor | `Color` | Color.Primary | 获得/设置 选择按钮颜色 默认 | +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | +| Color | `Color` | Color.None | 获得/设置 控件边框颜色样式 默认为 None 显示 | +| DateFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd" | +| DatePlaceHolderText | `string?` | - | 获得/设置 日期占位符文本 默认 null 读取资源文件 | +| DateTimeFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd HH:mm:ss" | +| DateTimePlaceHolderText | `string?` | - | 获得/设置 日期时间占位符文本 默认 null 读取资源文件 | +| DayDisabledTemplate | `RenderFragment 方法,建议外部使用缓存提高性能 | +| DisplayMinValueAsEmpty | `bool` | true | 获得/设置 是否将 显示为空字符串 默认 true | +| EnableDisabledDaysCache | `bool` | true | 获得/设置 是否启用获得年自定义禁用日期缓存 | +| FirstDayOfWeek | `DayOfWeek` | DayOfWeek.Sunday | 获得/设置 星期第一天 默认 | +| Icon | `string?` | - | 获得/设置 组件图标 默认 fa-regular fa-calendar-days | +| IsButton | `bool` | - | 获得/设置 是否显示为按钮样式 默认 false | +| IsEditable | `bool` | - | 获得/设置 是否可以编辑内容 默认 false | +| MaxValue | `DateTime?` | - | 获得/设置 当前日期最大值 | +| MinValue | `DateTime?` | - | 获得/设置 当前日期最小值 | +| OnBlurAsync | `Func 参数关闭 | +| PickerButtonText | `string?` | - | 获得/设置 选择按钮文本 默认 null 读取资源文件 | +| PickTimeMode | `PickTimeMode` | PickTimeMode.Dropdown | 获得/设置 选择时间方式 默认使用 | +| ShowFestivals | `bool` | - | 获得/设置 是否显示节日 默认 false | +| ShowHolidays | `bool` | - | 获得/设置 是否显示休假日 默认 false | +| ShowIcon | `bool` | true | 获得/设置 是否显示组件图标 默认 true 显示 | +| ShowLunar | `bool` | - | 获得/设置 是否显示中国阴历历法 默认 false | +| ShowSidebar | `bool` | - | 获得/设置 是否显示快捷侧边栏 默认不显示 | +| ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | +| SidebarTemplate | `RenderFragment + +### Public Methods + +- `void ClearDisabledDays()` + - 清除内部缓存方法 +- `Task TriggerHideCallback()` + - 客户端弹窗关闭后由 Javascript 调用此方法 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor) + +## DateTimeRange + +DateTimeRange 时间范围组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoClose | `bool` | - | Gets or sets whether to automatically close the popup after a date range is selected. Default is false. | +| AutoCloseClickSideBar | `bool` | - | 获得/设置 是否点击快捷侧边栏自动关闭弹窗 默认 false | +| ClearButtonText | `string?` | - | 获得/设置 清空按钮文字 | +| ClearIcon | `string?` | - | 获得/设置 清空图标 默认 fa-solid fa-circle-xmark | +| ConfirmButtonText | `string?` | - | 获得/设置 确定按钮文字 | +| DateFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd" | +| DateTimeFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd HH:mm:ss" | +| Icon | `string?` | - | 获得/设置 组件图标 | +| IsEditable | `bool` | - | 获得/设置 是否可以编辑内容 默认 false | +| MaxValue | `DateTime` | DateTime.MaxValue | 获得/设置 最大值 | +| MinValue | `DateTime` | DateTime.MinValue | 获得/设置 最小值 | +| OnClearValue | `Func + +### Public Methods + +- `Task TriggerHideCallback()` + - 客户端弹窗关闭后由 Javascript 调用此方法 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/DateTimeRange/DateTimeRange.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRange.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor) + +## Display + +Display 组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `ILookup` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| FormatString | `string?` | - | 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd | +| FormatterAsync | `Func | +| LookupService | `ILookupService?` | - | | +| LookupServiceData | `object?` | - | | +| LookupServiceKey | `string?` | - | | +| LookupStringComparison | `stringComparison` | StringComparison.OrdinalIgnoreCase | | +| ShowTooltip | `bool` | - | 获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示 | +| TypeResolver | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Display/Display.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Display/Display.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Displays.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Displays.razor) + +## DisplayBase + +显示组件基类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `BootstrapModuleComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| DisplayText | `string?` | - | 获得/设置 显示名称 | +| ShowLabel | `bool?` | - | 获得/设置 是否显示前置标签 默认值为 null 为空时默认不显示标签 | +| ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示 Tooltip 多用于文字过长导致裁减时使用 默认 null | +| Value | `TValue?` | - | Gets or sets the value of the input. This should be used with two-way binding. | +| ValueExpression | `Expression + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ValueChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Alignment | `Alignment` | Alignment.Center | 获得/设置 组件对齐方式 默认为居中 | +| ChildContent | `RenderFragment?` | - | 获得/设置 子内容 | +| Icon | `string?` | - | 获得/设置 文案显示图标 | +| IsVertical | `bool` | - | 获得/设置 是否为垂直显示 默认为 false | +| Text | `string?` | - | 获得/设置 文案显示文字 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Divider/Divider.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Divider/Divider.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Dividers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Dividers.razor) + +## DropUpload + +DropUpload 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BodyTemplate | `RenderFragment?` | - | 获得/设置 Body 模板 默认 null 设置 BodyTemplate 后 不生效 | +| FooterTemplate | `RenderFragment?` | - | 获得/设置 Footer 字符串模板 默认 null 未设置 | +| FooterText | `string?` | - | 获得/设置 Footer 字符串信息 默认 null 未设置 | +| IconTemplate | `RenderFragment?` | - | 获得/设置 图标模板 默认 null | +| InvalidStatusIcon | `string?` | - | 获得/设置 上传失败状态图标 | +| LoadingIcon | `string?` | - | 获得/设置 加载中图标 | +| OnGetFileFormat | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Upload/DropUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/DropUpload.razor.cs) + +## Dropzone + +拖拽容器 + +### Type Parameters + +- `TItem` - Generic type parameter + +**Inherits from**: `IDisposable` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Accepts | `Func + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| OnItemDrop | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| Image | `string?` | - | 获得/设置 图片路径 默认为 null | +| Template | `RenderFragment?` | - | 获得/设置 自定义模板 | +| Text | `string?` | - | 获得/设置 空状态描述 默认为 无数据 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Empty/Empty.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Empty/Empty.razor.cs) + +## EnumFilter + +Enum filter component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/EnumFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/EnumFilter.razor.cs) + +## FileIcon + +Icon 图标组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Extension | `string?` | - | 获得/设置 文件类型扩展名 **[Required]** | +| BackgroundTemplate | `RenderFragment?` | - | 获得/设置 背景图模板 默认 null 使用内部内置的空文件 svg 图 | +| IconColor | `Color` | Color.Primary | 获得/设置 图标类型背景色 默认 Color.Primary | +| Size | `Size` | - | 获得/设置 图标大小 默认 Color.None | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/FileIcon/FileIcon.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/FileIcon/FileIcon.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/FileIcons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/FileIcons.razor) + +## FileListUploadBase + +FileListUploadBase 基类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `UploadBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CancelIcon | `string?` | - | 获得/设置 取消图标 | +| DeleteIcon | `string?` | - | 获得/设置 删除按钮图标 | +| DownloadIcon | `string?` | - | 获得/设置 下载按钮图标 | +| OnCancel | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Upload/FileListUploadBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/FileListUploadBase.cs) + +## FilterBase + +过滤器基类 + +**Inherits from**: `BootstrapModuleComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Count | `int` | - | 获得/设置 条件数量 | +| FieldKey | `string?` | - | 获得/设置 相关 Field 字段名称 | +| IsHeaderRow | `bool` | - | 获得/设置 是否为 HeaderRow 模式 默认 false | + + + +### Public Methods + +- `FilterKeyValueAction GetFilterConditions()` + - 获得过滤窗口的所有条件方法 +- `void Reset()` + - 重置过滤条件方法 +- `Task SetFilterConditionsAsync(FilterKeyValueAction filter)` + - 设置过滤集合方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/FilterBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/FilterBase.cs) + +## FilterLogicItem + +FilterLogicItem 组件用于选择过滤条件的逻辑运算符 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Logic | `FilterLogic` | - | 获得/设置 逻辑运算符 | +| LogicChanged | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| LogicChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | Gets or sets the child content. Default is null. | +| ClearButtonText | `string?` | - | 获得/设置 重置按钮文本 | +| FilterButtonText | `string?` | - | 获得/设置 过滤按钮文本 | +| MinusIcon | `string?` | - | 获得/设置 减少过滤条件图标 | +| PlusIcon | `string?` | - | 获得/设置 增加过滤条件图标 | +| ShowMoreButton | `bool` | - | Gets or sets whether show the more button. Default is false. | +| Title | `string?` | - | Gets or sets the filter title. Default is null. | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/FilterProvider.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/FilterProvider.razor.cs) + +## FlipClock + +FlipClock 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BackgroundColor | `string?` | - | 获得/设置 组件背景色 默认 null 未设置使用样式默认值 radial-gradient(ellipse at center, rgba(150, 150, 150, 1) 0%, rgba(89, 89, 89, 1) 100%); | +| CardBackgroundColor | `string?` | - | 获得/设置 组件卡片背景颜色 默认 null 未设置使用样式默认值 #333; | +| CardColor | `string?` | - | 获得/设置 组件卡片字体颜色 默认 null 未设置使用样式默认值 #ccc; | +| CardDividerColor | `string?` | - | 获得/设置 组件卡片分割线颜色 默认 null 未设置使用样式默认值 rgba(0, 0, 0, .4); | +| CardDividerHeight | `string?` | - | 获得/设置 组件卡片分割线高度 默认 null 未设置使用样式默认值 1px; | +| CardGroupMargin | `string?` | - | 获得/设置 组件卡片组间隔 默认 null 未设置使用样式默认值 20; | +| CardHeight | `string?` | - | 获得/设置 组件卡片高度 默认 null 未设置使用样式默认值 90px; | +| CardMargin | `string?` | - | 获得/设置 组件卡片间隔 默认 null 未设置使用样式默认值 5; | +| CardWidth | `string?` | - | 获得/设置 组件卡片宽度 默认 null 未设置使用样式默认值 60px; | +| FontSize | `string?` | - | 获得/设置 组件字体大小 默认 null 未设置使用样式默认值 80px; | +| Height | `string?` | - | 获得/设置 组件高度 默认 null 未设置使用样式默认值 200px; | +| OnCompletedAsync | `Func 默认 模式下生效 | +| ViewMode | `FlipClockViewMode` | - | 获得/设置 显示模式 默认 | + + + +### Public Methods + +- `Task OnCompleted()` + - 倒计时结束回调方法由 JSInvoke 调用 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/FlipClock/FlipClock.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/FlipClock/FlipClock.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/FlipClocks.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/FlipClocks.razor) + +## FloatingLabel + +FloatingLabel 组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsGroupBox | `bool` | - | 获得/设置 是否为 GroupBox 样式 默认 false | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Input/FloatingLabel.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/FloatingLabel.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/FloatingLabels.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/FloatingLabels.razor) + +## Footer + +Footer 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 内容 | +| ShowGoto | `bool` | true | 获得/设置 是否显示 Goto 小组件 默认 true 显示 | +| Target | `string?` | - | 获得/设置 Footer 组件中返回顶端按钮控制的滚动条所在组件 设置 为 true 时生效 | +| Text | `string?` | - | 获得/设置 Footer 显示文字 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Footer/Footer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Footer/Footer.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Footers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Footers.razor) + +## Handwritten + +Handwritten 手写签名 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ClearButtonText | `string?` | - | 清除按钮文本 | +| Result | `string?` | - | 手写签名imgBase64字符串 | +| SaveButtonText | `string?` | - | 保存按钮文本 | +| HandwrittenBase64 | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| HandwrittenBase64 | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Id | `string?` | - | 获得/设置 组件 id 属性 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs) + +## IFrame + +Frame component encapsulates the Html iframe element + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Data | `object?` | - | Gets or sets the data to be passed | +| OnPostDataAsync | `Func + +### Public Methods + +- `Task PushData(object? data)` + - Method to push data +- `Task TriggerLoaded()` + - Called by JavaScript + - *[JSInvokable]* +- `Task TriggerPostData(object? data)` + - Called by JavaScript + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/IFrame/IFrame.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/IFrame/IFrame.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/IFrames.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/IFrames.razor) + +## ImagePreviewer + +图片预览组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| MinusIcon | `string?` | - | 获得/设置 缩小 Icon 图标 | +| NextIcon | `string?` | - | 获得/设置 下一张图片 Icon 图标 | +| PlusIcon | `string?` | - | 获得/设置 方法 Icon 图标 | +| PreviewList | `List + +### Public Methods + +- `Task Show(int index)` + - 显示图片 + +### Source + +- Component: [src/BootstrapBlazor/Components/ImagePreviewer/ImagePreviewer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ImagePreviewer/ImagePreviewer.razor.cs) + +## ImageViewer + +Image 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Url | `string?` | - | 获得/设置 图片 Url 默认 null 必填 **[Required]** | +| Alt | `string?` | - | 获得/设置 原生 alt 属性 默认 null 未设置 | +| ErrorTemplate | `RenderFragment?` | - | 获得/设置 错误模板 默认 null 未设置 | +| FileIcon | `string?` | - | 获得/设置 图片文件图标 | +| FitMode | `objectFitMode` | - | 获得/设置 原生 object-fit 属性 默认 fill 未设置 | +| HandleError | `bool` | - | 获得/设置 加载失败时是否显示错误占位符 默认 false | +| IsAsync | `bool` | - | 获得/设置 图片是否异步加载 | +| IsIntersectionObserver | `bool` | - | 获得/设置 是否交叉监听 默认 false | +| OnErrorAsync | `Func 或者 正在加载时显示 默认 null 未设置 | +| PreviewIndex | `int` | 0 | 获得/设置 预览大图当前链接集合点开的索引 默认为 0 | +| PreviewList | `List + +### Source + +- Component: [src/BootstrapBlazor/Components/ImageViewer/ImageViewer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/ImageViewers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ImageViewers.razor) + +## IntersectionObserver + +可见检测组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoUnobserveWhenIntersection | `bool` | true | 获得/设置 可见后是否自动取消观察 默认 true 可见后自动取消观察提高性能 | +| AutoUnobserveWhenNotIntersection | `bool` | - | 获得/设置 不可见后是否自动取消观察 默认 false 不可见后自动取消观察提高性能 | +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| OnIntersecting | `FuncThe element that is used as the viewport for checking visibility of the target. Must be the ancestor of the target. Defaults to the browser viewport if value is false. Default value is true | + + + +### Public Methods + +- `Task TriggerIntersecting(IntersectionObserverEntry entry)` + - 交叉检测回调方法 由 JavaScript 调用 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/IntersectionObservers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/IntersectionObservers.razor) + +## IntersectionObserverItem + +检测交叉组件子组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverItem.razor.cs) + +## Layout + +Layout 组件 + +**Inherits from**: `IHandlerException` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AdditionalAssemblies | `IEnumerable 设置值 | +| ErrorLoggerToastTitle | `string?` | - | 获得/设置 错误日志 弹窗标题 默认 null | +| ExcludeUrls | `IEnumerable 设置值 | +| ShowFooter | `bool` | - | 获得/设置 是否显示 Footer 模板 默认 false | +| ShowFullscreenToolbarButton | `bool` | true | Gets or sets whether show the full screen button. Default is true. | +| ShowGotoTop | `bool` | - | 获得/设置 是否显示返回顶端按钮 默认为 false 不显示 | +| ShowRefreshToolbarButton | `bool` | true | Gets or sets whether show the full screen button. Default is true. | +| ShowSplitBar | `bool` | - | 获得/设置 是否显示分割栏 默认 false 不显示 仅在 左右布局时有效 | +| ShowTabContextMenu | `bool` | - | Gets or sets whether enable tab context menu. Default is false. | +| ShowTabExtendButtons | `bool` | true | 获得/设置 标签是否显示扩展按钮 默认 true | +| ShowTabInHeader | `bool` | - | Gets or sets whether show the tab in header. Default is false. | +| ShowTabItemClose | `bool` | true | 获得/设置 标签是否显示关闭按钮 默认 true | +| ShowToolbar | `bool` | - | Gets or sets whether show the toolbar. Default is false. | +| Side | `RenderFragment?` | - | 获得/设置 Side 模板 | +| SidebarMaxWidth | `int?` | - | 获得/设置 侧边栏最大宽度 默认 null 未设置 | +| SidebarMinWidth | `int?` | - | 获得/设置 侧边栏最小宽度 默认 null 未设置 | +| SideWidth | `string?` | - | 获得/设置 侧边栏宽度,支持百分比,设置 0 时关闭宽度功能 默认值 300 | +| SkipAuthenticate | `bool` | - | 获得/设置 是否跳过认证逻辑 默认 false | +| TabContextMenuCloseAllIcon | `string?` | - | Gets or sets the icon of tab item context menu close all button. Default is null. | +| TabContextMenuCloseIcon | `string?` | - | Gets or sets the icon of tab item context menu close button. Default is null. | +| TabContextMenuCloseOtherIcon | `string?` | - | Gets or sets the icon of tab item context menu close other button. Default is null. | +| TabContextMenuRefreshIcon | `string?` | - | Gets or sets the icon of tab item context menu refresh button. Default is null. | +| TabContextMenuTemplate | `RenderFragment. | +| ToolbarTemplate | `RenderFragment + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| IsCollapsedChanged | `EventCallback +- `Task HandlerException(Exception ex, RenderFragment +- `void Render(RenderFragment renderFragment)` + - +- `void SetCollapsed(int width)` + - 设置侧边栏收缩方法 客户端监控 window.onResize 事件回调此方法 + - *[JSInvokable]* +- `Task UpdateAsync(string key)` + - 调用 Update 回调方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Layout/Layout.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Layout/Layout.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Layouts.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor) + +## LayoutSplitBar + +LayoutSidebar 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ContainerSelector | `string?` | - | 获得/设置 容器选择器 默认 null 未设置 组件拖动后设置容器 style="--bb-layout-sidebar-width: 200px;" 用于宽度调整 | +| Max | `int?` | - | 获得/设置 最大宽度 默认 null 未设置 | +| Min | `int?` | - | 获得/设置 最小宽度 默认 null 未设置 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs) + +## Light + +指示灯组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Color | `Color` | Color.Success | 获得/设置 指示灯颜色 默认为 Success 绿色 | +| IsFlash | `bool` | - | 获得/设置 组件是否闪烁 默认为 false 不闪烁 | +| IsFlat | `bool` | - | 获得/设置 是否为平面图形 默认 false | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Light/Light.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Light/Light.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Lights.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Lights.razor) + +## Link + +Link 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Href | `string?` | - | 获得/设置 href 属性值 **[Required]** | +| Rel | `string?` | "stylesheet" | 获得/设置 Rel 属性值, 默认 stylesheet | +| Version | `string?` | - | 获得/设置 版本号 默认 null 自动生成 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/HtmlTag/Link.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/HtmlTag/Link.razor.cs) + +## ListGroup + +ListGroup 组件 + +### Type Parameters + +- `TItem` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| GetItemDisplayText | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/ListGroup/ListGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ListGroup/ListGroup.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor) + +## ListView + +ListView 组件基类 + +### Type Parameters + +- `TItem` - Generic type parameter + +**Inherits from**: `BootstrapComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BodyTemplate | `RenderFragment | +| EmptyTemplate | `RenderFragment?` | - | 获得/设置 无数据时模板 默认 null 未设置 | +| EmptyText | `string?` | - | 获得/设置 无数据时显示文字 默认 null 未设置使用资源文件设置文字 | +| FooterTemplate | `RenderFragment?` | - | 获得/设置 FooterTemplate 默认 null 未设置 设置值后 参数不起作用,请自行实现分页功能 | +| GroupHeaderTextCallback | `Func 值 默认 null 使用分组 Key.ToString() 方法获取 | +| GroupItemOrderCallback | `Func | +| IsPagination | `bool` | - | 获得/设置 是否分页 默认为 false 不分页 设置 时分页功能自动被禁用 | +| IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | +| Items | `IEnumerable | +| OnListViewItemClick | `Func + +### Public Methods + +- `Task QueryAsync(int pageIndex, bool triggerByPagination)` + - 查询按钮调用此方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/ListView/ListView.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ListView/ListView.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/ListViews.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ListViews.razor) + +## LoadMore + +加载更多组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CanLoading | `bool` | true | 获得/设置 是否可以加载更多数据 默认为 true | +| LoadingTemplate | `RenderFragment?` | - | 获得/设置 加载更多模板 默认 null | +| NoMoreTemplate | `RenderFragment?` | - | 获得/设置 没有更多数据时显示的模板 默认为 null | +| NoMoreText | `string?` | - | 获得/设置 没有更多数据提示信息 默认为 null 读取资源文件中的预设值 | +| OnLoadMoreAsync | `Func 为 true 时才触发此回调方法 | +| Threshold | `string` | "1" | 获得/设置 触底元素触发 阈值 默认为 1 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs) + +## Logout + +ListView 组件基类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AvatarRadius | `string?` | - | Gets or sets the avatar border radius. Default is null. | +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| DisplayName | `string?` | - | 获得/设置 组件当前用户显示名称 | +| HeaderTemplate | `RenderFragment?` | - | 获得/设置 组件 HeaderTemplate | +| ImageUrl | `string?` | - | 获得/设置 组件当前用户头像 | +| LinkTemplate | `RenderFragment?` | - | 获得/设置 组件 LinkTemplate | +| PrefixDisplayNameText | `string?` | - | 获得/设置 组件当前用户显示名称前置文本 默认 欢迎 | +| PrefixUserNameText | `string?` | - | 获得/设置 组件当前用户登录账号前置文本 默认 当前账号 | +| ShowUserName | `bool` | true | 获得/设置 是否显示用户名 默认 true 显示 | +| UserName | `string?` | - | 获得/设置 组件当前用户登录账号 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Logout/Logout.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Logout/Logout.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Logouts.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Logouts.razor) + +## LogoutLink + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Icon | `string?` | - | 获得/设置 图标 | +| Text | `string?` | - | 获得/设置 按钮文字 | +| Url | `string?` | - | 获得/设置 按钮文字 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Logout/LogoutLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Logout/LogoutLink.razor.cs) + +## Marquee + +Marquee 字幕滚动组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BackgroundColor | `string` | "#fff" | 获得/设置 组件值 背景颜色 默认 #fff 支持16进制和颜色名称 | +| Color | `string` | "#000" | 获得/设置 组件值 文本颜色 默认 #000 支持16进制和颜色名称 | +| Direction | `MarqueeDirection` | - | 获得/设置 组件值 滚动方向 默认 LeftToRight | +| Duration | `int` | 14 | 获得/设置 组件值 动画时间 默认 14s 值越小滚动越快 | +| FontSize | `int` | 72 | 获得/设置 组件值 文本大小 默认 72px | +| Text | `string?` | - | 获得/设置 组件值 显示文本 默认 Empty | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Marquee/Marquee.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Marquee/Marquee.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Marquees.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Marquees.razor) + +## MultiFilter + +多选过滤器组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AlwaysTriggerGetItems | `bool` | - | 获得 是否每次弹窗时均调用 回调方法,多用于动态填装过滤条件 | +| Items | `IEnumerable | + + + +### Public Methods + +- `Task TriggerGetItemsCallback()` + - JavaScript 回调方法 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/MultiFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/MultiFilter.razor.cs) + +## NetworkMonitorIndicator + +Represents a network monitor indicator with customizable tooltip settings. + +**Inherits from**: `IDisposable` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| PopoverPlacement | `Placement` | Placement.Top | 获得/设置 Popover 显示位置 默认为 Top | +| Title | `string?` | - | 获得/设置 Popover 弹窗标题 默认为 null | +| Trigger | `string?` | - | 获得/设置 Popover 触发方式 默认为 hover focus | + + + +### Public Methods + +- `void Dispose()` + - + +### Source + +- Component: [src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorIndicator.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorIndicator.razor.cs) + +## NotSupportFilter + +NotSupportFilter component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| NotSupportedColumnFilterMessage | `string?` | - | 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/NotSupportFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/NotSupportFilter.razor.cs) + +## NullSwitch + +可为空布尔值组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| DefaultValueWhenNull | `bool` | - | 获得/设置 绑定值为空时的默认值 默认为 false | +| Height | `int` | 20 | 获得/设置 控件高度默认 20px | +| OffColor | `Color` | - | 获得/设置 关颜色 | +| OffInnerText | `string?` | - | 获得/设置 组件 Off 时内置显示文本 | +| OnColor | `Color` | Color.Success | 获得/设置 开颜色 | +| OnInnerText | `string?` | - | 获得/设置 组件 On 时内置显示文本 | +| ShowInnerText | `bool` | - | 获得/设置 是否显示内置文字 默认 false 显示 | +| Width | `int` | 40 | 获得/设置 组件宽度 默认 40 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Switch/NullSwitch.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Switch/NullSwitch.razor.cs) + +## NumberFilter + +NumberFilter component + +### Type Parameters + +- `TType` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/NumberFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/NumberFilter.razor.cs) + +## Pagination + +Pagination 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Alignment | `Alignment` | Alignment.Right | 获得/设置 对齐方式 默认 Alignment.Right | +| GotoNavigatorLabelText | `string?` | - | 获得/设置 Goto 导航标签显示文字 默认 导航到/Goto | +| GotoTemplate | `RenderFragment?` | - | 获得/设置 Goto 导航模板 默认 null | +| MaxPageLinkCount | `int` | 5 | 获得/设置 Page up/down 页码数量 默认 5 | +| NextEllipsisPageIcon | `string?` | - | 获得/设置 上一页图标 | +| NextPageIcon | `string?` | - | 获得/设置 下一页图标 | +| OnPageLinkClick | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Pagination/Pagination.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Pagination/Pagination.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Paginations.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Paginations.razor) + +## PaginationItem + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 子组件 | +| Index | `int` | - | 获得/设置 当前页码 | +| IsActive | `bool` | - | 获得/设置 是否激活 默认 false | +| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认 false | +| OnClick | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| OnClick | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Content | `string?` | - | 获得/设置 显示文字,复杂内容可通过 自定义 | +| ShowShadow | `bool` | true | 获得/设置 是否显示阴影 默认 true | +| Template | `RenderFragment?` | - | 获得/设置 内容模板 默认 null 设置值后 参数失效 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Popover/Popover.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Popover/Popover.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Popovers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Popovers.razor) + +## PopoverCompleteBase + +弹窗可悬浮组件基类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `BootstrapInputBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ClearIcon | `string?` | - | Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up. | +| CustomClass | `string?` | - | | +| Debounce | `int` | - | 获得/设置 防抖时间 默认为 0 即不开启 | +| IsClearable | `bool` | - | Gets or sets whether the select component is clearable. Default is false. | +| IsPopover | `bool` | - | | +| ItemTemplate | `RenderFragment | +| OnSelectedItemChanged | `Func | +| ScrollIntoViewBehavior | `ScrollIntoViewBehavior` | ScrollIntoViewBehavior.Smooth | 获得/设置 滚动行为 默认 | +| ShowShadow | `bool` | true | | +| SkipEnter | `bool` | - | 获得/设置 是否跳过 Enter 按键处理 默认 false | +| SkipEsc | `bool` | - | 获得/设置 是否跳过 Esc 按键处理 默认 false | + + + +### Public Methods + +- `Task TriggerBlur()` + - 触发 OnBlur 回调方法 由 Javascript 触发 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/AutoComplete/PopoverCompleteBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/AutoComplete/PopoverCompleteBase.cs) + +## Progress + +Progress 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Color | `Color` | Color.Primary | 获得/设置 颜色 默认为 Color.Primary | +| Height | `int?` | - | 获得/设置 控件高度 默认 null 未设置 | +| IsAnimated | `bool` | - | 获得/设置 是否动画 默认 false | +| IsShowValue | `bool` | - | 获得/设置 是否显示进度条值 默认 false | +| IsStriped | `bool` | - | 获得/设置 是否显示为条纹 默认 false | +| MidpointRounding | `MidpointRounding` | MidpointRounding.AwayFromZero | 获得/设置 保留小数点模式 默认为 AwayFromZero | +| Round | `int` | - | 获得/设置 进度值修约小数位数, 默认 0 (即保留为整数) | +| Text | `string?` | - | 获得/设置 进度标签文本 | +| Value | `double` | - | 获得/设置 组件进度值 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Progress/Progress.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Progress/Progress.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Progress.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Progress.razor) + +## QueryBuilder + +QueryBuilder 组件 + +### Type Parameters + +- `TModel` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Value | `FilterKeyValueAction?` | - | 获得/设置 过滤模型 实例值 **[Required]** | +| ChildContent | `RenderFragment + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ValueChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| Logic | `FilterLogic` | - | 获得/设置 逻辑运算符 | + + + +### Public Methods + +- `void Dispose()` + - 释放资源 + +### Source + +- Component: [src/BootstrapBlazor/Components/QueryBuilder/QueryGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/QueryBuilder/QueryGroup.razor.cs) + +## Radio + +Radio 单选框组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `Checkbox` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| GroupName | `string?` | - | 获得/设置 Radio 组名称一般来讲需要设置 默认为 null 未设置 **[Required]** | +| OnClick | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Radio/Radio.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Radio/Radio.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Radios.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Radios.razor) + +## RadioList + +单选框组合组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoSelectFirstWhenValueIsNull | `bool` | true | 获得/设置 未设置选中项时是否自动选择第一项 默认 true | +| IsAutoAddNullItem | `bool` | - | 获得/设置 值为可为空枚举类型时是否自动添加空值 默认 false 自定义空值显示文本请参考 | +| NullItemText | `string?` | - | 获得/设置 空值项显示文字 默认为 "" 是否自动添加空值请参考 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Radio/RadioList.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Radio/RadioList.razor.cs) + +## RadioListGeneric + +单选框组合组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `IModelEqualityComparer` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | +| CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 | +| IsAutoAddNullItem | `bool` | - | 获得/设置 值为可为空枚举类型时是否自动添加空值 默认 false 自定义空值显示文本请参考 | +| IsButton | `bool` | - | 获得/设置 是否为按钮样式 默认 false | +| IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | +| Items | `IEnumerable提供此回调方法时忽略 属性 | +| NullItemText | `string?` | - | 获得/设置 空值项显示文字 默认为 "" 是否自动添加空值请参考 | +| OnSelectedChanged | `Func + +### Public Methods + +- `bool Equals(TValue? x, TValue? y)` + - + +### Source + +- Component: [src/BootstrapBlazor/Components/Radio/RadioListGeneric.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Radio/RadioListGeneric.razor.cs) + +## Rate + +Rate 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsDisable | `bool` | - | 获得/设置 是否禁用 默认为 false | +| IsReadonly | `bool` | - | 获得/设置 是否只读 默认为 false | +| IsWrap | `bool` | - | 获得/设置 是否禁止换行 默认为 true | +| ItemTemplate | `RenderFragment + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ValueChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AutoReconnect | `bool` | true | 获得/设置 是否自动尝试重连 默认 true | +| ReconnectFailedTemplate | `RenderFragment?` | - | 获得/设置 ReconnectFailedTemplate 模板 | +| ReconnectingTemplate | `RenderFragment?` | - | 获得/设置 ReconnectingTemplate 模板 | +| ReconnectInterval | `int` | 5000 | 获得/设置 自动重连间隔 默认 5000 毫秒 最小值为 1000 毫秒 | +| ReconnectRejectedTemplate | `RenderFragment?` | - | 获得/设置 ReconnectRejectedTemplate 模板 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Reconnector/ReconnectorContent.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Reconnector/ReconnectorContent.razor.cs) + +## RenderTemplate + +RenderTemplate component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | Gets or sets the child component | +| OnRenderAsync | `Func + +### Public Methods + +- `void Render()` + - Render method + +### Source + +- Component: [src/BootstrapBlazor/Components/BaseComponents/RenderTemplate.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/BaseComponents/RenderTemplate.razor.cs) + +## Repeater + +Repeat 组件 + +### Type Parameters + +- `TItem` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ContainerTemplate | `RenderFragment + +### Source + +- Component: [src/BootstrapBlazor/Components/Repeater/Repeater.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Repeater/Repeater.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Repeaters.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Repeaters.razor) + +## Row + +Row 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| ColSpan | `int?` | - | 获得/设置 子 Row 跨父 Row 列数 默认为 null | +| ItemsPerRow | `ItemsPerRow` | - | 获得/设置 设置一行显示多少个子组件 | +| RowType | `RowType` | - | 获得/设置 设置行格式 默认 Row 布局 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Row/Row.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Row/Row.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Rows.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Rows.razor) + +## Script + +Script 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Src | `string?` | - | 获得/设置 src 属性值 **[Required]** | +| Version | `string?` | - | 获得/设置 版本号 默认 null 自动生成 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/HtmlTag/Script.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/HtmlTag/Script.razor.cs) + +## Scroll + +Scroll 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| Height | `string?` | - | 获得/设置 组件高度 | +| ScrollHoverWidth | `int?` | - | 获得/设置 滚动条 hover 状态下宽度 默认 null 未设置使用 配置类中的 | +| ScrollWidth | `int?` | - | 获得/设置 滚动条宽度 默认 null 未设置使用 配置类中的 | +| Width | `string?` | - | 获得/设置 组件宽度 | + + + +### Public Methods + +- `Task ScrollToBottom()` + - 滚动到底部 + +### Source + +- Component: [src/BootstrapBlazor/Components/Scroll/Scroll.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Scroll/Scroll.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Scrolls.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Scrolls.razor) + +## Search + +Search component + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ButtonTemplate | `RenderFragment. | +| ClearButtonIcon | `string?` | - | Gets or sets the icon of clear button. Default is null. | +| ClearButtonText | `string?` | - | Gets or sets the text of clear button. Default is null. | +| IconTemplate | `RenderFragment. | +| SearchButtonIcon | `string?` | - | Gets or sets the search button icon. Default is null. | +| SearchButtonLoadingIcon | `string?` | - | Gets or sets the loading icon for the search button. Default is null. | +| SearchButtonText | `string?` | - | Gets or sets the search button text. Default is null. | +| ShowClearButton | `bool` | - | Gets or sets whether to show the clear button. Default is false. | +| ShowPrefixIcon | `bool` | - | Gets or sets whether to show the prefix icon. Default is false. | +| ShowSearchButton | `bool` | true | Gets or sets whether to show the search button. Default is true. | + + + +### Public Methods + +- `Task TriggerFilter(string val)` + - TriggerFilter method called by Javascript. + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Search/Search.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Search/Search.razor.cs) + +## Segmented + +Segmented 组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 | +| IsBlock | `bool` | - | 获得/设置 是否充满父元素 默认 false | +| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认 false | +| Items | `IEnumerable | +| Value | `TValue?` | - | 获得/设置 选中值 默认 null | +| ValueChanged | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ValueChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Icon | `string?` | - | Gets or sets the icon. Default is null. | +| IconColor | `string?` | - | Gets or sets the icon color. Default is null. | +| Label | `string?` | - | Gets or sets the label of badge. Default is null. | +| LabelBackgroundColor | `string?` | - | Gets or sets the label background color. Default is null. | +| LabelColor | `string?` | - | Gets or sets the label color of badge. Default is null. | +| Radius | `int` | 3 | Gets or sets the badge radius. Default is 3. | +| Text | `string?` | - | Gets or sets the text of badge. Default is null. | +| TextBackgroundColor | `string?` | - | Gets or sets the text background color. Default is null. | +| TextColor | `string?` | - | Gets or sets the text color. Default is null. | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/ShieldBadges.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ShieldBadges.razor) + +## SkeletonBase + +骨架屏组件基类 + +**Inherits from**: `BootstrapComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Active | `bool` | true | 获得/设置 是否显示动画 默认为 true | +| Round | `bool` | true | 获得/设置 是否圆角 默认为 true | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Skeleton/SkeletonBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Skeleton/SkeletonBase.cs) + +## Slider + +Range 组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Max | `TValue?` | - | 获得/设置 最大值 默认为 null 未设置 | +| Min | `TValue?` | - | 获得/设置 最小值 默认为 null 未设置 | +| Step | `TValue?` | - | 获得/设置 步长 默认为 null 未设置 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Slider/Slider.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Slider/Slider.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Sliders.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor) + +## SpeechWave + +语音识别波形图组件 + +**Inherits from**: `IDisposable` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| OnTimeout | `Func + +### Public Methods + +- `void Dispose()` + - Dispose 方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Speeches/SpeechWaves.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Speeches/SpeechWaves.razor) + +## Spinner + +Spinner 组件基类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Color | `Color` | - | 获得/设置 Spinner 颜色 默认 None 无设置 | +| Size | `Size` | - | 获得 / 设置 Spinner 大小 默认 None 无设置 | +| SpinnerType | `SpinnerType` | - | 获得/设置 Spinner 类型 默认为 Border | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Spinner/Spinner.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Spinner/Spinner.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Spinners.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Spinners.razor) + +## Split + +Split 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Basis | `string` | "50%" | 获得/设置 第一个窗格初始化位置占比 默认为 50% | +| FirstPaneMinimumSize | `string?` | - | 获得/设置 第一个窗格模板 支持任意单位如 10px 20% 5em 1rem 未提供单位时默认为 px | +| FirstPaneTemplate | `RenderFragment?` | - | 获得/设置 第一个窗格模板 | +| IsCollapsible | `bool` | - | 获取 是否开启折叠功能 默认 false | +| IsKeepOriginalSize | `bool` | true | 获得/设置 开启 后,恢复时是否保持原始大小 默认 true | +| IsVertical | `bool` | - | 获得/设置 是否垂直分割 | +| OnResizedAsync | `Func | +| SecondPaneMinimumSize | `string?` | - | 获得/设置 第一个窗格模板 | +| SecondPaneTemplate | `RenderFragment?` | - | 获得/设置 第二个窗格模板 支持任意单位如 10px 20% 5em 1rem 未提供单位时默认为 px | +| ShowBarHandle | `bool` | true | 获取 是否显示拖动条 默认 true | + + + +### Public Methods + +- `Task SetLeftWidth(string leftWidth)` + - 设置左侧窗格宽度 +- `Task TriggerOnResize(string left)` + - 窗格折叠时回调方法 由 JavaScript 调用 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Split/Split.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Split/Split.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Splits.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Splits.razor) + +## Stack + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AlignItems | `StackAlignItems` | - | 获得/设置 垂直布局模式 默认 StackAlignItems.Stretch | +| ChildContent | `RenderFragment?` | - | 获得/设置 内容 | +| IsReverse | `bool` | - | 获得/设置 是否反向布局 默认 false | +| IsRow | `bool` | - | 获得/设置 是否为行布局 默认 false | +| IsWrap | `bool` | - | 获得/设置 是否允许折行 默认 false | +| Justify | `StackJustifyContent` | - | 获得/设置 水平布局调整 默认 StackJustifyContent.Start | + + + +### Public Methods + +- `void AddItem(StackItem item)` + - 添加子项 +- `void RemoveItem(StackItem item)` + - 移除子项 + +### Source + +- Component: [src/BootstrapBlazor/Components/Stack/Stack.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Stack/Stack.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Stacks.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Stacks.razor) + +## StringFilter + +StringFilter component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/StringFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/StringFilter.razor.cs) + +## SvgIcon + +SvgIcon 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Name | `string?` | - | 获得/设置 图标名称 **[Required]** | +| Href | `string?` | - | 获得 图标地址 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Icon/SvgIcon.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Icon/SvgIcon.razor.cs) + +## SweetAlertBody + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| BodyTemplate | `RenderFragment?` | - | 获得/设置 显示内容模板 | +| ButtonTemplate | `RenderFragment?` | - | 获得/设置 按钮模板 | +| CancelButtonText | `string?` | - | 获得/设置 取消按钮文字 默认为 取消 | +| Category | `SwalCategory` | - | 获得/设置 弹窗类别默认为 Success | +| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 | +| CloseButtonText | `string?` | - | 获得/设置 关闭按钮文字 默认为 关闭 | +| ConfirmButtonIcon | `string?` | - | 获得/设置 确认按钮图标 | +| ConfirmButtonText | `string?` | - | 获得/设置 确认按钮文字 默认为 确认 | +| Content | `string?` | - | 获得/设置 显示内容 | +| FooterTemplate | `RenderFragment?` | - | 获得/设置 Footer 模板 | +| IsConfirm | `bool` | - | 获得/设置 是否为确认弹窗模式 默认为 false | +| OnCloseAsync | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs) + +## Switch + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Height | `int` | 20 | 获得/设置 控件高度默认 20px | +| OffColor | `Color` | - | 获得/设置 关颜色 | +| OffInnerText | `string?` | - | 获得/设置 组件 Off 时内置显示文本 | +| OnColor | `Color` | Color.Success | 获得/设置 开颜色 | +| OnInnerText | `string?` | - | 获得/设置 组件 On 时内置显示文本 | +| ShowInnerText | `bool` | - | 获得/设置 是否显示内置文字 默认 false 显示 | +| Width | `int` | 40 | 获得/设置 组件宽度 默认 40 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Switch/Switch.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Switch/Switch.razor.cs) + +## ThemeProvider + +ThemeProvider 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ActiveIcon | `string?` | - | 获得/设置 当前选中模式图标 默认 null | +| Alignment | `Alignment` | Alignment.Right | 获得/设置 下拉框对其方式 默认 Right | +| AutoModeIcon | `string?` | - | 获得/设置 自动模式图标 默认 null | +| AutoModeText | `string?` | - | 获得/设置 自动模式文本 默认 null 未设置使用本地化资源 | +| DarkModeIcon | `string?` | - | 获得/设置 暗黑模式图标 默认 null | +| DarkModeText | `string?` | - | 获得/设置 暗黑模式文本 默认 null 未设置使用本地化资源 | +| LightModeIcon | `string?` | - | 获得/设置 明亮模式图标 默认 null | +| LightModeText | `string?` | - | 获得/设置 明亮模式文本 默认 null 未设置使用本地化资源 | +| OnThemeChangedAsync | `Func + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ThemeValueChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsAlternate | `bool` | - | 获得/设置 是否左右交替出现 默认 false | +| IsLeft | `bool` | - | 获得/设置 内容是否出现在时间线左侧 默认为 false | +| IsReverse | `bool` | - | 获得/设置 是否反转 | +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Timeline/Timeline.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Timeline/Timeline.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Timelines.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Timelines.razor) + +## TimePicker + +TimePicker 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CancelButtonText | `string?` | - | 获得/设置 取消按钮显示文字 | +| ConfirmButtonText | `string?` | - | 获得/设置 确定按钮显示文字 | +| HasSeconds | `bool` | true | 获得/设置 是否显示秒 默认为 true | +| OnClose | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/TimePicker/TimePicker.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/TimePicker/TimePicker.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/TimePickers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/TimePickers.razor) + +## TimePickerCell + +时间选择滚轮单元组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| DownIcon | `string?` | - | 获得/设置 向下箭头图标 | +| UpIcon | `string?` | - | 获得/设置 向上箭头图标 | +| Value | `TimeSpan` | - | 获得/设置 组件值 | +| ViewMode | `TimePickerCellViewMode` | - | 获得/设置 时间选择框视图模式 | +| ValueChanged | `EventCallback + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ValueChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CancelText | `string?` | - | 获得/设置 取消按钮文字 | +| Icon | `string?` | - | 获得/设置 Alert 图标 | +| IsVibrate | `bool` | true | 获得/设置 倒计时结束时设备震动 | +| OnCancel | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Timer/Timer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Timer/Timer.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Timers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Timers.razor) + +## Toggle + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Color | `Color` | Color.Success | 获得/设置 组件颜色 默认为 Success 颜色 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Toggle/Toggle.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toggle/Toggle.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Toggles.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor) + +## ToggleBase + +Toggle 开关组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `ValidateBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| OffText | `string?` | - | 获得/设置 组件 Off 时显示文本 | +| OnText | `string?` | - | 获得/设置 组件 On 时显示文本 | +| Width | `int` | 120 | 获得/设置 组件宽度 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Toggle/ToggleBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toggle/ToggleBase.cs) + +## Toolbar + +Toolbar 组件用于显示工具栏内容 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | +| IsWrap | `bool` | - | 获得/设置 是否允许换行显示工具栏内容 默认 false | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Toolbar/Toolbar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toolbar/Toolbar.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Toolbars.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Toolbars.razor) + +## ToolbarItem + +ToolbarItem 组件用于在工具栏中添加子组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Toolbar/ToolbarItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toolbar/ToolbarItem.razor.cs) + +## Tooltip + +Tooltip 组件 + +**Inherits from**: `ITooltip` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| CustomClass | `string?` | - | | +| Delay | `string?` | - | | +| FallbackPlacements | `string[]?` | - | 获得/设置 位置 默认为 null | +| GetTitleCallback | `Func | +| Offset | `string?` | - | 获得/设置 偏移量 默认为 null | +| Placement | `Placement` | Placement.Top | | +| Sanitize | `bool` | true | | +| Selector | `string?` | - | | +| Title | `string?` | - | | +| Trigger | `string?` | - | | + + + +### Public Methods + +- `Task Hide(int? delay)` + - 关闭 Tooltip 弹窗方法 +- `void SetParameters(string title, Placement placement, string? trigger, string? customClass, bool? isHtml, bool? sanitize, string? delay, string? selector, string? offset)` + - 设置参数方法 +- `Task Show(int? delay)` + - 显示 Tooltip 弹窗方法 +- `Task Toggle(int? delay)` + - 切换 Tooltip 弹窗当前状态方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Tooltip/Tooltip.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tooltip/Tooltip.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Tooltips.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Tooltips.razor) + +## TooltipWrapperBase + +TooltipWrapperBase 基类 + +**Inherits from**: `BootstrapModuleComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| TooltipPlacement | `Placement` | Placement.Top | 获得/设置 Tooltip 显示位置 默认为 Top | +| TooltipText | `string?` | - | 获得/设置 TooltipText 显示文字 默认为 null | +| TooltipTrigger | `string?` | - | 获得/设置 Tooltip 触发方式 默认为 hover focus | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Tooltip/TooltipWrapperBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tooltip/TooltipWrapperBase.cs) + +## Transition + +Transition 动画组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子内容 | +| Duration | `int` | - | 获得/设置 动画执行时长 单位毫秒 默认为 0 未生效 | +| OnTransitionEnd | `Func + +### Public Methods + +- `Task TransitionEndAsync()` + - 动画执行完毕结束异步方法 JSInvoke 调用 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Transition/Transition.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Transition/Transition.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Transitions.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Transitions.razor) + +## Typed + +TypedJs 组件类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| OnCompleteAsync | `Func 实例 默认 null | +| Text | `string?` | - | 获得/设置 组件显示文字 默认 null 未设置 | + + + +### Public Methods + +- `Task TriggerComplete()` + - 打字结束方法 由 Javascript 触发 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Typed/Typed.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Typed/Typed.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Typeds.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Typeds.razor) + +## UploadBase + +Upload 组件基类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `ValidateBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Accept | `string?` | - | 获得/设置 上传接收的文件格式 默认为 null 接收任意格式 | +| Capture | `string?` | - | 获得/设置 媒体捕获机制的首选面向模式,默认为 null | +| DefaultFileList | `List + +### Public Methods + +- `void Reset()` + - 清空上传列表方法 Clear the upload files collection. + +### Source + +- Component: [src/BootstrapBlazor/Components/Upload/UploadBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/UploadBase.cs) + +## UploadPreviewList + +UploadPreviewList component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CancelIcon | `string?` | - | 获得/设置 取消图标 | +| DeleteIcon | `string?` | - | 获得/设置 删除按钮图标 | +| DownloadIcon | `string?` | - | 获得/设置 下载按钮图标 | +| FileIconArchive | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconAudio | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconCode | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconDocx | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconExcel | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconFile | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconImage | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconPdf | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconPPT | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconVideo | `string?` | - | 获得/设置 Excel 类型文件图标 | +| FileIconZip | `string?` | - | 获得/设置 Excel 类型文件图标 | +| InvalidStatusIcon | `string?` | - | 获得/设置 上传失败状态图标 | +| IsDisabled | `bool` | - | Gets or sets the disable status of the upload list. | +| Items | `List获得/设置 浏览按钮图标 | +| OnCancel | `FuncGets or sets the callback method for the cancel button click event. Default is null 获得/设置 点击取消按钮回调此方法 默认 null | +| OnDelete | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Upload/UploadPreviewList.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/UploadPreviewList.razor.cs) + +## ValidateBase + +支持客户端验证的文本框基类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `DisplayBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | +| OnValueChanged | `Func + +### Public Methods + +- `bool IsComplexValue(object? value)` + - +- `void SetDisable(bool disable)` + - 设置是否可用状态 +- `void SetLabel(string label)` + - 设置 Label 值 +- `void SetValue(TValue value)` + - 设置 Value 值 +- `Task ToggleMessage(IReadOnlyCollection + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ItemMinHeight | `int` | 316 | 获得/设置 每一项最小宽度 默认 316 用于显示 loading 图标 | +| ItemTemplate | `RenderFragment + +### Public Methods + +- `Task OnClickItem(WaterfallItem item)` + - 点击图片回调方法 + - *[JSInvokable]* +- `Task OnloadAsync(WaterfallItem? item)` + - 请求数据回调方法 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Waterfall/Waterfall.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Waterfall/Waterfall.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Tutorials/Waterfall.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Tutorials/Waterfall.razor) + +## Watermark + +Watermark 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 **[Required]** | +| Color | `string?` | - | 获得/设置 颜色 默认 null 未设置 | +| FontSize | `int?` | - | 获得/设置 字体大小 默认 null 未设置 默认使用 16px 字体大小 单位 px | +| Gap | `int?` | - | 获得/设置 水印之间的间距 值 默认 null | +| IsPage | `bool` | - | 获得/设置 是否为整页面水印 默认 false | +| Rotate | `int?` | - | 获得/设置 水印的旋转角度 默认 null 45° | +| Text | `string?` | - | 获得/设置 水印文本 默认 BootstrapBlazor | +| ZIndex | `int?` | - | 获得/设置 水印元素的 z-index 值 默认 null | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Watermarks.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Watermarks.razor) + +--- + + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt new file mode 100644 index 00000000000..0cbf4ad4729 --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt @@ -0,0 +1,807 @@ +# BootstrapBlazor Selection Components + +> Auto-generated parameter reference for select components + +## Components + +- [AutoComplete](#autocomplete) +- [Cascader](#cascader) +- [Dropdown](#dropdown) +- [DropdownItem](#dropdownitem) +- [DropdownWidget](#dropdownwidget) +- [MultiSelect](#multiselect) +- [MultiSelectFilter](#multiselectfilter) +- [MultiSelectGeneric](#multiselectgeneric) +- [NavbarDropdown](#navbardropdown) +- [NavbarDropdownItem](#navbardropdownitem) +- [PopoverDropdownBase](#popoverdropdownbase) +- [PopoverSelectBase](#popoverselectbase) +- [Select](#select) +- [SelectBase](#selectbase) +- [SelectGeneric](#selectgeneric) +- [SelectObject](#selectobject) +- [SelectTree](#selecttree) +- [SimpleSelectBase](#simpleselectbase) +- [SubCascader](#subcascader) +- [Transfer](#transfer) +- [TransferPanel](#transferpanel) + +## AutoComplete + +AutoComplete component + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| DisplayCount | `int?` | - | Gets or sets the number of items to display when matching data | +| Icon | `string?` | - | Gets or sets the icon | +| IgnoreCase | `bool` | true | Gets or sets whether to ignore case when matching, default is true | +| IsLikeMatch | `bool` | - | Gets or sets whether to enable fuzzy search, default is false | +| Items | `IEnumerable + +### Public Methods + +- `void TriggerChange(string v)` + - 支持双向绑定 由客户端 JavaScript 触发 + - *[JSInvokable]* +- `Task TriggerClear()` + - 点击清空按钮时调用此方法 由 Javascript 触发 + - *[JSInvokable]* +- `Task TriggerFilter(string val)` + - TriggerFilter method + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor) + +## Cascader + +Cascader 组件实现类 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ClearIcon | `string?` | - | 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up | +| Color | `Color` | Color.None | 获得/设置 按钮颜色 | +| Icon | `string?` | - | 获得/设置 菜单指示图标 | +| IsClearable | `bool` | - | 获得/设置 是否可清除 默认 false | +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Cascader/Cascader.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Cascader/Cascader.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor) + +## Dropdown + +Dropdown 下拉框组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ButtonTemplate | `RenderFragment 为 true 时生效 | +| IsFixedButtonText | `bool` | - | 获得/设置 是否固定按钮文字 更改下拉框选项时按钮文字保持不变 默认 false 不固定 | +| IsKeepDisabled | `bool` | - | 获得/设置 是否异步结束后是否保持禁用状态,默认为 false | +| Items | `IEnumerable 为 true 时生效 | +| OnSelectedItemChanged | `Func 为 true 时生效 | + + + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| OnClick | `EventCallback 为 true 时生效 | + +### Source + +- Component: [src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor) + +## DropdownItem + +DropdownItem 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 | +| Disabled | `bool` | - | 获得/设置 是否被禁用 默认 false 优先级低于 | +| Icon | `string?` | - | 获得/设置 图标 | +| OnClick | `Func | +| Text | `string?` | - | 获得/设置 显示文本 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Dropdown/DropdownItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dropdown/DropdownItem.razor.cs) + +## DropdownWidget + +DropdownWidget 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 选项模板支持静态数据 | +| Items | `IEnumerable + +### Public Methods + +- `Task TriggerStateChanged(int index, bool shown)` + - Widget 下拉项关闭回调方法 由 JavaScript 调用 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/DropdownWidget/DropdownWidget.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidget.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor) + +## MultiSelect + +MultiSelect component + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ButtonTemplate | `RenderFragment?` | - | 获得/设置 扩展按钮模板 | +| ClearText | `string?` | - | 获得/设置 全选按钮显示文本 | +| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 默认为 null | +| DefaultVirtualizeItemText | `string?` | - | Gets or sets the default virtualize items text. | +| DisplayTemplate | `RenderFragment返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 | +| OnSelectedItemsChanged | `Func + +### Public Methods + +- `Task Clear()` + - 清除选择项方法 +- `Task ConfirmSelectedItem(int index)` + - 客户端回车回调方法 + - *[JSInvokable]* +- `Task InvertSelect()` + - 翻转选择项方法 +- `Task SelectAll()` + - 全选选择项方法 +- `Task ToggleRow(string val)` + - 切换当前选项方法 + - *[JSInvokable]* +- `Task + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `List + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/MultiSelectFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/MultiSelectFilter.razor.cs) + +## MultiSelectGeneric + +MultiSelectGeneric component + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `IModelEqualityComparer` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ButtonTemplate | `RenderFragment?` | - | 获得/设置 扩展按钮模板 | +| ClearText | `string?` | - | 获得/设置 全选按钮显示文本 | +| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 默认为 null | +| CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 | +| DefaultVirtualizeItemText | `string?` | - | Gets or sets the default virtualize items text. | +| DisplayTemplate | `RenderFragment返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 | +| OnQueryAsync | `Func提供此回调方法时忽略 属性 | + + + +### Public Methods + +- `Task Clear()` + - 清除选择项方法 +- `Task ConfirmSelectedItem(int index)` + - 客户端回车回调方法 + - *[JSInvokable]* +- `bool Equals(TValue? x, TValue? y)` + - +- `Task InvertSelect()` + - 翻转选择项方法 +- `Task SelectAll()` + - 全选选择项方法 +- `Task ToggleRow(string val)` + - 切换当前选项方法 + - *[JSInvokable]* +- `Task TriggerOnSearch(string searchText)` + - Triggers the search callback method. + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/SelectGeneric/MultiSelectGeneric.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/SelectGeneric/MultiSelectGeneric.razor.cs) + +## NavbarDropdown + +NavbarDropdown 组件用于在导航栏中创建下拉菜单 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | +| Direction | `Direction` | - | 获得/设置 下拉选项方向 默认 Dropdown 向下 | +| MenuAlignment | `Alignment` | - | 获得/设置 获取菜单对齐方式 默认 none 未设置 | +| Text | `string?` | - | 获得/设置 Dropdown 菜单标题文本 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Navbar/NavbarDropdown.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarDropdown.razor.cs) + +## NavbarDropdownItem + +NavbarDropdownItem 组件用于在导航栏下拉菜单中创建菜单项 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | +| Target | `string?` | - | 获得/设置 A 标签 target 参数 默认 null | +| Url | `string?` | - | 获得/设置 菜单项文本 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Navbar/NavbarDropdownItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarDropdownItem.razor.cs) + +## PopoverDropdownBase + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `ValidateBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CustomClass | `string?` | - | 获得/设置 自定义样式 参数 默认 null | +| Placement | `Placement` | Placement.Bottom | 获得/设置 弹窗位置 默认为 Bottom | +| ShowShadow | `bool` | true | 获得/设置 是否显示阴影 默认 true | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/DateTimePicker/PopoverDropdownBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DateTimePicker/PopoverDropdownBase.cs) + +## PopoverSelectBase + +PopoverSelectBase 基类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `PopoverDropdownBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsPopover | `bool` | - | 获得/设置 是否使用 Popover 渲染下拉框 默认 false | +| Offset | `string?` | - | 获得/设置 弹窗偏移量 默认 [0, 10] | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Select/PopoverSelectBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/PopoverSelectBase.cs) + +## Select + +Select component + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `ISelect` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| DefaultVirtualizeItemText | `string?` | - | Gets or sets the default text for virtualized items. Default is null. | +| DisableItemChangedWhenFirstRender | `bool` | - | Gets or sets whether to disable the OnSelectedItemChanged callback method on first render. Default is false. | +| DisplayTemplate | `RenderFragmentGets or sets a value indicating Whether to use the first option or the candidate marked as active as the default value when the value is null | +| LookupService | `ILookupService?` | - | | +| LookupServiceData | `object?` | - | | +| LookupServiceKey | `string?` | - | | +| OnBeforeSelectedItemChange | `FuncGets or sets the callback method before the selected item changes. Returns true to change the selected item value; otherwise, the selected item value does not change. | +| OnCollapsed | `Func + +### Public Methods + +- `void Add(SelectedItem item)` + - +- `Task ConfirmSelectedItem(int index)` + - Confirms the selected item. + - *[JSInvokable]* +- `Task TriggerCollapsed()` + - Trigger event callback method. called by JavaScript. + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Select/Select.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/Select.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Selects.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Selects.razor) + +## SelectBase + +SelectBase component base class + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `PopoverSelectBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ClearIcon | `string?` | - | Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up. | +| Color | `Color` | - | Gets or sets the color. The default is (no color). | +| DropdownIcon | `string?` | - | Gets or sets the dropdown icon. The default is "fa-solid fa-angle-up". | +| GroupItemTemplate | `RenderFragment. The default is false. | +| IsVirtualize | `bool` | - | Gets or sets whether virtual scrolling is enabled. Default is false. | +| NoSearchDataText | `string?` | - | Gets or sets the text to display when no search results are found. | +| OnClearAsync | `Func. | +| SearchIcon | `string?` | - | Gets or sets the search icon. | +| SearchLoadingIcon | `string?` | - | Gets or sets the search loading icon. | +| ShowSearch | `bool` | - | Gets or sets a value indicating whether to show the search box. The default is false. | +| StringComparison | `stringComparison` | StringComparison.OrdinalIgnoreCase | Gets or sets the string comparison rule. The default is . | + + + +### Public Methods + +- `void ClearSearchText()` + - Clears the search text. +- `Task Hide()` + - Hides the dropdown. +- `Task Show()` + - Shows the dropdown. + +### Source + +- Component: [src/BootstrapBlazor/Components/Select/SelectBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SelectBase.cs) + +## SelectGeneric + +Select 泛型组件实现类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `ISelectGeneric` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 | +| DisableItemChangedWhenFirstRender | `bool` | - | 获得/设置 禁止首次加载时触发 OnSelectedItemChanged 回调方法 默认 false | +| DisplayTemplate | `RenderFragment返回值为 null 时放弃操作 | +| ValueEqualityComparer | `Func提供此回调方法时忽略 属性 | + + + +### Public Methods + +- `void Add(SelectedItem +- `Task TriggerOnSearch(string searchText)` + - 客户端搜索栏回调方法 + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor) + +## SelectObject + +Select 组件实现类 + +### Type Parameters + +- `TItem` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment + +### Public Methods + +- `Task CloseAsync()` + - 关闭当前弹窗方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Select/SelectObject.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SelectObject.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/SelectObjects.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SelectObjects.razor) + +## SelectTree + +Select 组件实现类 + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `IModelEqualityComparer` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `List | +| DropdownIcon | `string?` | - | 获得/设置 下拉箭头 Icon 图标 | +| IsEditable | `bool` | - | 获得/设置 是否可编辑 默认 false | +| ModelEqualityComparer | `Func + +### Public Methods + +- `bool Equals(TValue? x, TValue? y)` + - 比较数据是否相同 + +### Source + +- Component: [src/BootstrapBlazor/Components/Select/SelectTree.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SelectTree.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/SelectTrees.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SelectTrees.razor) + +## SimpleSelectBase + +SimpleSelectBase component base class + +### Type Parameters + +- `TValue` - Generic type parameter + +**Inherits from**: `SelectBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| IsEditable | `bool` | - | Gets or sets whether the select component is editable. Default is false. | +| Items | `IEnumerable + +### Public Methods + +- `Task TriggerOnSearch(string searchText)` + - Triggers the search callback method. + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/Select/SimpleSelectBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SimpleSelectBase.cs) + +## SubCascader + +SubCascader 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Cascader/SubCascader.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Cascader/SubCascader.razor.cs) + +## Transfer + +穿梭框组件 + +### Type Parameters + +- `TValue` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `IEnumerable + +### Source + +- Component: [src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/Transfers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor) + +## TransferPanel + +TransferPanelBase 穿梭框面板组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| HeaderTemplate | `RenderFragment + +### Source + +- Component: [src/BootstrapBlazor/Components/Transfer/TransferPanel.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Transfer/TransferPanel.razor.cs) + +--- + + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt new file mode 100644 index 00000000000..a2e8a6a8d51 --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt @@ -0,0 +1,393 @@ +# BootstrapBlazor Table Components + +> Auto-generated parameter reference for table components + +## Components + +- [SelectTable](#selecttable) +- [SkeletonTable](#skeletontable) +- [Table](#table) +- [TableAdvancedSortDialog](#tableadvancedsortdialog) +- [TableColumnFilter](#tablecolumnfilter) +- [TableExtensionButton](#tableextensionbutton) +- [TableFooterCell](#tablefootercell) +- [TableToolbar](#tabletoolbar) + +## SelectTable + +下拉表格组件实现类 + +### Type Parameters + +- `TItem` - Generic type parameter + +**Inherits from**: `IColumnCollection` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| GetTextCallback | `Func 值 Top | +| Color | `Color` | - | 获得/设置 颜色 默认 Color.None 无设置 | +| CustomerSearchModel | `ITableSearchModel?` | - | 获得/设置 自定义搜索模型 | +| CustomerSearchTemplate | `RenderFragment | +| DropdownIcon | `string?` | - | 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up | +| EmptyTemplate | `RenderFragment?` | - | 获得/设置 无数据时显示模板 默认 null | +| Height | `int` | 486 | 获得/设置 表格高度 默认 486px | +| IsClearable | `bool` | - | 获得/设置 是否可清除 默认 false | +| IsPagination | `bool` | - | 获得/设置 是否分页 默认为 false | +| OnClearAsync | `Func + +### Public Methods + +- `Task QueryAsync()` + - 查询方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Select/SelectTable.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SelectTable.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/SelectTables.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SelectTables.razor) + +## SkeletonTable + +表格骨架屏组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Columns | `int` | 3 | 获得/设置 行数 默认 3 列 | +| Rows | `int` | 7 | 获得/设置 行数 默认 7 行 | +| ShowToolbar | `bool` | true | 获得/设置 是否显示工具栏 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Skeleton/SkeletonTable.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Skeleton/SkeletonTable.razor.cs) + +## Table + +Table 组件基类 + +### Type Parameters + +- `TItem` - Generic type parameter + +**Inherits from**: `ITable` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AlignCenterText | `string?` | - | 获得/设置 居中对齐显示文本 | +| AlignCenterTooltipText | `string?` | - | 获得/设置 居中对齐提示信息文本 | +| AlignLeftText | `string?` | - | 获得/设置 左对齐显示文本 | +| AlignLeftTooltipText | `string?` | - | 获得/设置左对齐提示信息文本 | +| AlignRightText | `string?` | - | 获得/设置 右对齐显示文本 | +| AlignRightTooltipText | `string?` | - | 获得/设置 右对齐提示信息文本 | +| AllowDragColumn | `bool` | - | 获得/设置 是否允许拖放标题栏更改栏位顺序,默认为 false | +| AllowResizing | `bool` | - | 获得/设置 是否允许列宽度调整 默认 false 固定表头时此属性生效 | +| AutoRefreshInterval | `int` | 2000 | 获得/设置 自动刷新时间间隔 默认 2000 毫秒 | +| AutoScrollLastSelectedRowToView | `bool` | - | 获得/设置 是否自动将选中行滚动到可视区域 默认 false | +| AutoScrollVerticalAlign | `ScrollToViewAlign` | ScrollToViewAlign.Center | 获得/设置 选中行滚动到可视区域对齐方式 默认 ScrollToViewAlign.Center | +| AutoSearchOnInput | `bool` | - | Gets or sets a value indicating whether automatic search functionality is enabled. Default value is false. | +| CheckboxColumnCompactWidth | `int` | - | 获得/设置 紧凑模式下复选框宽度 默认 28 | +| CheckboxColumnWidth | `int` | - | 获得/设置 复选框宽度 默认 36 | +| ClientTableName | `string?` | - | 获得/设置 客户端表格名称 默认 null 用于客户端列宽与列顺序持久化功能 | +| ColumnMinWidth | `int?` | - | 获得/设置 列最小宽度 默认 null 未设置 可通过 统一设置 | +| ColumnOrderCallback | `Func
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 | +| DefaultFixedColumnWidth | `int` | 200 | 获得/设置 默认固定列宽度 默认 200 单位 px | +| DetailColumnWidth | `int` | - | 获得/设置 明细行 Row Header 宽度 默认 24 | +| DetailRowTemplate | `RenderFragment | +| DisableAddButtonCallback | `Func Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 | +| EditDialogRowType | `RowType` | RowType.Inline | 获得/设置 设置行内组件布局格式 默认 Inline 布局 | +| EmptyImage | `string?` | - | 获得/设置 无数据时显示图片路径 默认 null 未设置 | +| EmptyTemplate | `RenderFragment?` | - | 获得/设置 无数据时显示模板 默认 null | +| EmptyText | `string?` | - | 获得/设置 无数据时显示文本 默认取资源文件 英文 NoData 中文 无数据 | +| EnableKeyboardNavigationCell | `bool` | true | 获得/设置 是否启用 Excel 模式下的键盘导航功能 默认 true | +| FitColumnWidthIncludeHeader | `bool` | - | 获得/设置 列宽自适应时是否包含表头 默认 false | +| FooterTemplate | `RenderFragment,默认为浅色 | +| HeaderTextWrap | `bool` | - | 获得/设置 是否表头允许折行 默认 false 不折行 此设置为 true 时覆盖 参数值 | +| Height | `int?` | - | 获得/设置 Table 高度 默认为 null | +| IsAccordion | `bool` | - | 获得/设置 明细行手风琴效果 默认 false | +| IsAutoQueryFirstRender | `bool` | true | 获得/设置 首次加载时是否自动查询数据 默认 true 模式下此参数不起作用 | +| IsAutoRefresh | `bool` | - | 获得/设置 是否自动刷新表格 默认为 false | +| IsAutoScrollTopWhenClickPage | `bool` | - | 获得/设置 翻页时是否自动滚动到顶部 默认 false | +| IsBordered | `bool` | - | 获得/设置 是否带边框样式 默认为 false | +| IsDetails | `bool?` | - | 获得/设置 是否显示明细行 默认为 null 为空时使用 进行逻辑判断 | +| IsExcel | `bool` | - | 获得/设置 组件工作模式为 Excel 模式 默认 false | +| IsFixedFooter | `bool` | - | 获得/设置 固定 Footer 默认 false | +| IsFixedHeader | `bool` | - | 获得/设置 固定表头 默认 false | +| IsGroupExtendButtons | `bool` | true | 获得/设置 是否使用按钮组显示行内扩展按钮 默认 true | +| IsHideFooterWhenNoData | `bool` | - | 获得/设置 无数据时是否隐藏表格 Footer 默认为 false 不隐藏 | +| IsPopoverToolbarDropdownButton | `bool` | - | 获得/设置 工具栏下拉框按钮是否 IsPopover 默认 false | +| IsStriped | `bool` | - | 获得/设置 是否斑马线样式 默认为 false | +| IsTracking | `bool` | - | 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false | +| Items | `IEnumerable 回调委托 | +| LineNoColumnAlignment | `Alignment` | - | 获得/设置 行号内容位置 | +| LineNoColumnWidth | `int` | - | 获得/设置 行号列宽度 默认 60 | +| LoadingTemplate | `RenderFragment?` | - | 获得/设置 Loading 模板 | +| ModelEqualityComparer | `Func提供此回调方法时忽略 属性 | +| MultiHeaderTemplate | `RenderFragment?` | - | 获得/设置 多表头模板 | +| NotSupportedColumnFilterMessage | `string?` | - | 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 | +| OnAfterRenderCallback | `Func 配置类中的 | +| ScrollMode | `ScrollMode` | - | 获得/设置 数据滚动模式 | +| ScrollWidth | `int?` | - | 获得/设置 滚动条宽度 默认 null 未设置使用 配置类中的 | +| ShowCheckboxTextColumnWidth | `int` | - | 获得/设置 显示文字的复选框列宽度 默认 80 | +| ShowColumnWidthTooltip | `bool` | - | 获得/设置 是否显示列宽提示信息,默认 false 显示 | +| ShowCopyColumnTooltip | `bool` | true | 获得/设置 CopyColumn Tooltip 默认 true | +| ShowDetailRow | `Func + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ItemsChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `IEnumerable + +### Event Callbacks + +| Event | Type | Description | +|-------|------|-------------| +| ValueChanged | `EventCallback + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Column | `ITableColumn?` | - | 获得 相关联 ITableColumn 实例 | +| Icon | `string?` | - | 获得/设置 过滤图标 | +| IsActive | `bool` | - | 获得/设置 是否 active | +| IsHeaderRow | `bool` | - | 获得/设置 是否为 HeaderRow 模式 默认 false | +| NotSupportedColumnFilterMessage | `string?` | - | 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 | +| Table | `ITable?` | - | 获得/设置 ITable 实例 | + + + +### Public Methods + +- `Task OnFilterAsync()` + - Filter method +- `Task Reset()` + - Reset filter method + +### Source + +- Component: [src/BootstrapBlazor/Components/Filters/TableColumnFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/TableColumnFilter.razor.cs) + +## TableExtensionButton + +TableExtensionButton 表格扩展按钮类 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | Specifies the content to be rendered inside this | +| OnClickButton | `Func + +### Public Methods + +- `void AddButton(ITableCellComponent button)` + - 添加按钮到工具栏方法 +- `void RemoveButton(ITableCellComponent button)` + - 从工具栏中移除按钮 + +### Source + +- Component: [src/BootstrapBlazor/Components/Table/TableExtensionButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Table/TableExtensionButton.razor.cs) + +## TableFooterCell + +TableFooterCell 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Aggregate | `AggregateType` | - | 获得/设置 聚合方法枚举 默认 Sum | +| Align | `Alignment` | - | 获得/设置 文字对齐方式 默认为 Alignment.None | +| ColspanCallback | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/Table/TableFooterCell.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Table/TableFooterCell.razor.cs) + +## TableToolbar + +Table Toolbar 组件 + +### Type Parameters + +- `TItem` - Generic type parameter + +**Inherits from**: `ComponentBase` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ChildContent | `RenderFragment?` | - | Specifies the content to be rendered inside this | +| GearIcon | `string?` | - | 获得/设置 移动端按钮图标 | +| IsAutoCollapsedToolbarButton | `bool` | true | 获得/设置 是否自动收缩工具栏按钮 默认 true | +| OnGetSelectedRows | `Func + +### Public Methods + +- `void AddButton(IToolbarComponent button)` + - 添加按钮到工具栏方法 +- `void RemoveButton(IToolbarComponent button)` + - 移除按钮到工具栏方法 + +### Source + +- Component: [src/BootstrapBlazor/Components/Table/TableToolbar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Table/TableToolbar.razor.cs) + +--- + + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt new file mode 100644 index 00000000000..b303364649b --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt @@ -0,0 +1,198 @@ +# BootstrapBlazor Tree Components + +> Auto-generated parameter reference for treeview components + +## Components + +- [SkeletonTree](#skeletontree) +- [Tree](#tree) +- [TreeView](#treeview) +- [TreeViewRow](#treeviewrow) + +## SkeletonTree + +树状组件骨架屏组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Icon | `string?` | - | 获得/设置 Loading 图标 | + + + +### Source + +- Component: [src/BootstrapBlazor/Components/Skeleton/SkeletonTree.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Skeleton/SkeletonTree.razor.cs) + +## Tree + +Tree 组件 + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| ActiveItem | `TreeItem?` | - | 获得/设置 选中节点 默认 null | +| ClickToggleNode | `bool` | - | 获得/设置 是否点击节点时展开或者收缩子项 默认 false | +| ExpandNodeIcon | `string?` | - | 获得/设置 Tree Node 展开节点图标 | +| IsAccordion | `bool` | - | 获得/设置 是否为手风琴效果 默认为 false | +| Items | `List + +### Public Methods + +- `IEnumerable` + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| AllowDrag | `bool` | - | Gets or sets a value indicating whether drag-and-drop operations are allowed. Default is false | +| AutoCheckChildren | `bool` | - | Gets or sets whether to automatically update child nodes when the node state changes. Default is false. | +| AutoCheckParent | `bool` | - | Gets or sets whether to automatically update parent nodes when the node state changes. Default is false. | +| CanExpandWhenDisabled | `bool` | - | Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. | +| ClearSearchIcon | `string?` | - | Gets or sets the clear search icon. Default is not set, using the built-in theme icon. | +| ClickToggleCheck | `bool` | - | Gets or sets whether clicking a node toggles its checkbox state. Default is false. Effective when is true. | +| ClickToggleNode | `bool` | - | Gets or sets whether clicking a node expands or collapses its children. Default is false. | +| CustomKeyAttribute | `Type` | typeof(KeyAttribute) | | +| EnableKeyboard | `bool` | - | Gets or sets whether to enable keyboard navigation. Default is false. ArrowLeft collapses the node. ArrowRight expands the node. ArrowUp moves to the previous node. ArrowDown moves to the next node. Space selects the current node. | +| ExpandNodeIcon | `string?` | - | Gets or sets the icon for expanded tree nodes. | +| IsAccordion | `bool` | - | Gets or sets whether the tree view has accordion behavior. Default is false. Accordion behavior is not supported in virtual scrolling mode. | +| IsDisabled | `bool` | - | Gets or sets whether the entire component is disabled. Default is false. | +| IsVirtualize | `bool` | - | Gets or sets whether to enable virtual scrolling. Default is false. | +| Items | `List | +| NodeIcon | `string?` | - | Gets or sets the icon for tree nodes. | +| OnBeforeTreeItemClick | `FuncIf return true will update the tree text value, otherwise will not update. | +| OverscanCount | `int` | 10 | Gets or sets the overscan count for virtual scrolling. Default is 10. | +| RowHeight | `float` | 29f | Gets or sets the row height for virtual scrolling. Default is 29f. | +| ScrollIntoViewOptions | `ScrollIntoViewOptions?` | - | Gets or sets the scroll into view options for keyboard navigation. Default is null, using { behavior: "smooth", block: "nearest", inline: "start" }. | +| SearchIcon | `string?` | - | Gets or sets the search icon. Default is not set, using the built-in theme icon. | +| SearchTemplate | `RenderFragment?` | - | Gets or sets the search bar template. Default is null. | +| ShowCheckbox | `bool` | - | Gets or sets whether to show checkboxes. Default is false. | +| ShowIcon | `bool` | - | Gets or sets whether to show icons. Default is false. | +| ShowResetSearchButton | `bool` | true | Gets or sets whether to show the reset search button. Default is true. | +| ShowSearch | `bool` | - | Gets or sets whether to show the search bar. Default is false. | +| ShowSkeleton | `bool` | - | Gets or sets whether to show the loading skeleton. Default is false. | +| ShowToolbar | `bool` | - | Gets or sets whether show the toolbar of tree view item. Default is false. | +| ShowToolbarCallback | `Func + +### Public Methods + +- `void ClearCheckedItems()` + - Clear all selected nodes +- `bool Equals(TItem? x, TItem? y)` + - Check if the data is the same +- `IEnumerable +- `ValueTask TriggerDragEnd(int originIndex, int currentIndex, bool isChildren)` + - Triggers the end of a drag-and-drop operation within the tree view. + - *[JSInvokable]* +- `ValueTask TriggerKeyDown(string key)` + - Client-side user keyboard operation handler method called by JavaScript + - *[JSInvokable]* + +### Source + +- Component: [src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs) +- Examples: [src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor) + +## TreeViewRow + +TreeViewRow component + +### Type Parameters + +- `TItem` - Generic type parameter + +### Parameters + + + +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| CanExpandWhenDisabled | `bool` | - | Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. | +| ExpandNodeIcon | `string?` | - | Gets or sets the icon for expanded tree nodes. | +| Index | `int` | - | Gets or sets the node index. Default is 0. | +| IsActive | `bool` | - | Gets or sets whether the node is active. Default is false. | +| IsDisabled | `bool` | - | Gets or sets whether the entire component is disabled. Default is false. | +| Item | `TreeViewItemIf return true will update the tree text value, otherwise will not update. | +| ShowCheckbox | `bool` | - | Gets or sets whether to show checkboxes. Default is false. | +| ShowIcon | `bool` | - | Gets or sets whether to show icons. Default is false. | +| ShowToolbar | `bool` | - | Gets or sets whether show the toolbar of tree view item. Default is false. | +| ShowToolbarCallback | `Func + +### Source + +- Component: [src/BootstrapBlazor/Components/TreeView/TreeViewRow.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/TreeView/TreeViewRow.razor.cs) + +--- + + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt new file mode 100644 index 00000000000..7230f4aa1b5 --- /dev/null +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt @@ -0,0 +1,145 @@ +# BootstrapBlazor + +> Enterprise-class Blazor UI component library based on Bootstrap 5 + +## Quick Start + +```bash +dotnet add package BootstrapBlazor +``` + +### Configuration + +```csharp +// Program.cs +builder.Services.AddBootstrapBlazor(); +``` + +```razor +@* _Imports.razor *@ +@using BootstrapBlazor.Components +``` + +```html + + + +``` + +## Component Categories + +For detailed documentation, refer to the specific llms-{category}.txt files. + +### Buttons +→ See: llms-button.txt + +Button, button group, dropdown button, split button + +Components: Button, ButtonBase, ButtonUpload, DialButton, FilterButton, FullScreenButton, GoTop, NavbarToggleButton, PopConfirmButton, PopConfirmButtonBase + ... and 9 more + +### Containers +→ See: llms-card.txt + +Card, collapse, group box, split, layout + +Components: Card, CardUpload, Collapse, GroupBox + +### Dialogs & Feedback +→ See: llms-dialog.txt + +Modal, drawer, dialog service, message, toast + +Components: DialogBase, Drawer, EditDialog, IconDialog, Message, Modal, ModalDialog, ResultDialogFooter, SearchDialog, Toast + ... and 1 more + +### Form Validation +→ See: llms-form.txt + +ValidateForm, editor form, validation rules + +Components: EditorForm, ValidateForm + +### Form Inputs +→ See: llms-input.txt + +Text input, number input, textarea, date picker + +Components: BootstrapInput, BootstrapInputBase, BootstrapInputEventBase, BootstrapInputGroup, BootstrapInputGroupIcon, BootstrapInputNumber, InputUpload, OtpInput, Textarea + +### Navigation +→ See: llms-nav.txt + +Menu, tabs, breadcrumb, steps, pagination + +Components: Anchor, AnchorLink, Breadcrumb, ContextMenu, ContextMenuZone, GotoNavigator, Menu, MenuLink, Nav, Navbar + ... and 14 more + +### Other Components +→ See: llms-other.txt + +Miscellaneous components + +Components: Affix, Alert, AlertBase, AutoFill, Avatar, AvatarUpload, Badge, BoolFilter, BootstrapBlazorIcon, BootstrapBlazorRoot + ... and 107 more + +### Selection Components +→ See: llms-select.txt + +Select, multi-select, autocomplete, cascader, transfer + +Components: AutoComplete, Cascader, Dropdown, DropdownItem, DropdownWidget, MultiSelect, MultiSelectFilter, MultiSelectGeneric, NavbarDropdown, NavbarDropdownItem + ... and 11 more + +### Data Display - Table +→ See: llms-table.txt + +Complex data table with sorting, filtering, paging, editing + +Components: SelectTable, SkeletonTable, Table, TableAdvancedSortDialog, TableColumnFilter, TableExtensionButton, TableFooterCell, TableToolbar + +### Tree Components +→ See: llms-treeview.txt + +TreeView, tree select + +Components: SkeletonTree, Tree, TreeView, TreeViewRow + +## Source Code Reference + +GitHub Repository: https://github.com/dotnetcore/BootstrapBlazor + +When documentation is insufficient, consult the source code: + +### File Structure + +``` +https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/{ComponentName}/ +├── {Component}.razor # Razor template +├── {Component}.razor.cs # Component logic & parameters +├── {Component}Base.cs # Base class (if exists) +├── {Component}Option.cs # Configuration options +└── {Component}Service.cs # Service class (Dialog, Toast, etc.) +``` + +### Examples + +``` +https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/{ComponentName}s.razor +``` + +### Reading Component Parameters + +Look for properties with `[Parameter]` attribute: + +```csharp +/// +/// Gets or sets whether to show the toolbar +/// +[Parameter] +public bool ShowToolbar { get; set; } +``` + +--- +Generated: 2026-01-01 +Repository: https://github.com/dotnetcore/BootstrapBlazor/blob/main/ diff --git a/tools/LlmsDocsGenerator/ComponentAnalyzer.cs b/tools/LlmsDocsGenerator/ComponentAnalyzer.cs new file mode 100644 index 00000000000..13ecbb66daa --- /dev/null +++ b/tools/LlmsDocsGenerator/ComponentAnalyzer.cs @@ -0,0 +1,387 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License +// See the LICENSE file in the project root for more information. +// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone + +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using System.Text.RegularExpressions; + +namespace LlmsDocsGenerator; + +/// +/// Analyzes Blazor component source files using Roslyn +/// +public partial class ComponentAnalyzer +{ + private readonly string _sourcePath; + private readonly string _componentsPath; + private readonly string _samplesPath; + + public ComponentAnalyzer(string sourcePath) + { + _sourcePath = sourcePath; + _componentsPath = Path.Combine(sourcePath, "Components"); + _samplesPath = Path.Combine(Path.GetDirectoryName(sourcePath)!, "BootstrapBlazor.Server", "Components", "Samples"); + } + + /// + /// Analyze all components in the source directory + /// + public async Task> AnalyzeAllComponentsAsync() + { + var components = new List(); + + if (!Directory.Exists(_componentsPath)) + { + Console.WriteLine($"Components directory not found: {_componentsPath}"); + return components; + } + + // Find all .razor.cs files + var files = Directory.GetFiles(_componentsPath, "*.razor.cs", SearchOption.AllDirectories); + + foreach (var file in files) + { + var component = await AnalyzeFileAsync(file); + if (component != null && component.Parameters.Count > 0) + { + components.Add(component); + } + } + + // Also analyze .cs files that might be component base classes + var csFiles = Directory.GetFiles(_componentsPath, "*Base.cs", SearchOption.AllDirectories); + foreach (var file in csFiles) + { + var component = await AnalyzeFileAsync(file); + if (component != null && component.Parameters.Count > 0) + { + components.Add(component); + } + } + + return components.OrderBy(c => c.Name).ToList(); + } + + /// + /// Analyze a specific component by name + /// + public async Task AnalyzeComponentAsync(string componentName) + { + var pattern = $"{componentName}.razor.cs"; + var files = Directory.GetFiles(_componentsPath, pattern, SearchOption.AllDirectories); + + if (files.Length == 0) + { + // Try without .razor extension + pattern = $"{componentName}.cs"; + files = Directory.GetFiles(_componentsPath, pattern, SearchOption.AllDirectories); + } + + if (files.Length == 0) + { + return null; + } + + return await AnalyzeFileAsync(files[0]); + } + + private async Task AnalyzeFileAsync(string filePath) + { + try + { + var code = await File.ReadAllTextAsync(filePath); + var tree = CSharpSyntaxTree.ParseText(code); + var root = await tree.GetRootAsync(); + + // Find the class declaration + var classDeclaration = root.DescendantNodes() + .OfType() + .FirstOrDefault(); + + if (classDeclaration == null) + { + return null; + } + + var component = new ComponentInfo + { + Name = GetClassName(classDeclaration), + FullName = GetFullClassName(classDeclaration, root), + Summary = ExtractXmlSummary(classDeclaration), + TypeParameters = GetTypeParameters(classDeclaration), + BaseClass = GetBaseClass(classDeclaration), + SourcePath = GetRelativePath(filePath), + LastModified = File.GetLastWriteTimeUtc(filePath), + SamplePath = FindSamplePath(GetClassName(classDeclaration)) + }; + + // Extract parameters + component.Parameters = ExtractParameters(classDeclaration); + + // Extract public methods + component.PublicMethods = ExtractPublicMethods(classDeclaration); + + return component; + } + catch (Exception ex) + { + Console.WriteLine($"Error analyzing {filePath}: {ex.Message}"); + return null; + } + } + + private string GetClassName(ClassDeclarationSyntax classDeclaration) + { + var name = classDeclaration.Identifier.Text; + + // Remove generic part for display name + if (classDeclaration.TypeParameterList != null) + { + return name; + } + + return name; + } + + private string GetFullClassName(ClassDeclarationSyntax classDeclaration, SyntaxNode root) + { + var namespaceName = root.DescendantNodes() + .OfType() + .FirstOrDefault()?.Name.ToString() ?? ""; + + var className = classDeclaration.Identifier.Text; + + if (classDeclaration.TypeParameterList != null) + { + className += classDeclaration.TypeParameterList.ToString(); + } + + return string.IsNullOrEmpty(namespaceName) ? className : $"{namespaceName}.{className}"; + } + + private List GetTypeParameters(ClassDeclarationSyntax classDeclaration) + { + if (classDeclaration.TypeParameterList == null) + { + return new List(); + } + + return classDeclaration.TypeParameterList.Parameters + .Select(p => p.Identifier.Text) + .ToList(); + } + + private string? GetBaseClass(ClassDeclarationSyntax classDeclaration) + { + var baseList = classDeclaration.BaseList; + if (baseList == null) return null; + + var baseType = baseList.Types.FirstOrDefault(); + return baseType?.Type.ToString(); + } + + private List ExtractParameters(ClassDeclarationSyntax classDeclaration) + { + var parameters = new List(); + + var properties = classDeclaration.DescendantNodes() + .OfType(); + + foreach (var property in properties) + { + // Check if property has [Parameter] attribute + var hasParameterAttr = property.AttributeLists + .SelectMany(a => a.Attributes) + .Any(a => a.Name.ToString() is "Parameter" or "ParameterAttribute"); + + if (!hasParameterAttr) continue; + + var paramInfo = new ParameterInfo + { + Name = property.Identifier.Text, + Type = SimplifyTypeName(property.Type?.ToString() ?? "unknown"), + DefaultValue = GetDefaultValue(property), + Description = ExtractXmlSummary(property), + IsRequired = HasAttribute(property, "EditorRequired"), + IsObsolete = HasAttribute(property, "Obsolete"), + ObsoleteMessage = GetObsoleteMessage(property), + IsEventCallback = property.Type?.ToString().Contains("EventCallback") ?? false + }; + + // Skip obsolete parameters + if (!paramInfo.IsObsolete) + { + parameters.Add(paramInfo); + } + } + + return parameters.OrderBy(p => p.Name).ToList(); + } + + private List ExtractPublicMethods(ClassDeclarationSyntax classDeclaration) + { + var methods = new List(); + + var methodDeclarations = classDeclaration.DescendantNodes() + .OfType() + .Where(m => m.Modifiers.Any(mod => mod.IsKind(SyntaxKind.PublicKeyword))); + + foreach (var method in methodDeclarations) + { + // Skip property accessors, overrides of base class methods + if (method.Modifiers.Any(m => m.IsKind(SyntaxKind.OverrideKeyword))) + continue; + + var methodInfo = new MethodInfo + { + Name = method.Identifier.Text, + ReturnType = SimplifyTypeName(method.ReturnType.ToString()), + Description = ExtractXmlSummary(method), + IsJSInvokable = HasAttribute(method, "JSInvokable"), + Parameters = method.ParameterList.Parameters + .Select(p => (SimplifyTypeName(p.Type?.ToString() ?? ""), p.Identifier.Text)) + .ToList() + }; + + methods.Add(methodInfo); + } + + return methods; + } + + private string? ExtractXmlSummary(SyntaxNode node) + { + var trivia = node.GetLeadingTrivia(); + var xmlTrivia = trivia.FirstOrDefault(t => + t.IsKind(SyntaxKind.SingleLineDocumentationCommentTrivia) || + t.IsKind(SyntaxKind.MultiLineDocumentationCommentTrivia)); + + if (xmlTrivia == default) + return null; + + var xmlText = xmlTrivia.ToString(); + + // Extract content from tags + var match = SummaryRegex().Match(xmlText); + if (match.Success) + { + var summary = match.Groups[1].Value; + // Clean up the summary + summary = CleanXmlComment(summary); + return string.IsNullOrWhiteSpace(summary) ? null : summary; + } + + return null; + } + + private string CleanXmlComment(string comment) + { + // Remove /// prefixes and extra whitespace + var lines = comment.Split('\n') + .Select(l => l.Trim().TrimStart('/').Trim()) + .Where(l => !string.IsNullOrWhiteSpace(l)); + + return string.Join(" ", lines); + } + + private string? GetDefaultValue(PropertyDeclarationSyntax property) + { + var initializer = property.Initializer; + if (initializer != null) + { + return SimplifyDefaultValue(initializer.Value.ToString()); + } + + // Check for default in constructor or OnParametersSet + return null; + } + + private string SimplifyDefaultValue(string value) + { + // Simplify common patterns + if (value == "false") return "false"; + if (value == "true") return "true"; + if (value == "null") return "null"; + if (value == "0") return "0"; + if (value == "string.Empty" || value == "\"\"") return "\"\""; + if (value.StartsWith("new ")) return "new()"; + + return value; + } + + private string SimplifyTypeName(string typeName) + { + // Simplify common type names + return typeName + .Replace("System.", "") + .Replace("Collections.Generic.", "") + .Replace("Threading.Tasks.", "") + .Replace("Nullable<", "") + .Replace(">", "?") + .Replace("Int32", "int") + .Replace("Int64", "long") + .Replace("Boolean", "bool") + .Replace("String", "string") + .Replace("Object", "object"); + } + + private bool HasAttribute(MemberDeclarationSyntax member, string attributeName) + { + return member.AttributeLists + .SelectMany(a => a.Attributes) + .Any(a => a.Name.ToString() == attributeName || + a.Name.ToString() == attributeName + "Attribute"); + } + + private string? GetObsoleteMessage(PropertyDeclarationSyntax property) + { + var obsoleteAttr = property.AttributeLists + .SelectMany(a => a.Attributes) + .FirstOrDefault(a => a.Name.ToString() is "Obsolete" or "ObsoleteAttribute"); + + if (obsoleteAttr?.ArgumentList?.Arguments.Count > 0) + { + return obsoleteAttr.ArgumentList.Arguments[0].ToString().Trim('"'); + } + + return null; + } + + private string GetRelativePath(string fullPath) + { + var basePath = Path.GetDirectoryName(Path.GetDirectoryName(_sourcePath))!; + return Path.GetRelativePath(basePath, fullPath).Replace('\\', '/'); + } + + private string? FindSamplePath(string componentName) + { + if (!Directory.Exists(_samplesPath)) + return null; + + // Try common sample file naming patterns + var patterns = new[] + { + $"{componentName}s.razor", + $"{componentName}.razor", + $"{componentName}Demo.razor", + $"{componentName}Sample.razor" + }; + + foreach (var pattern in patterns) + { + var files = Directory.GetFiles(_samplesPath, pattern, SearchOption.AllDirectories); + if (files.Length > 0) + { + return GetRelativePath(files[0]); + } + } + + return null; + } + + [GeneratedRegex(@"\s*(.*?)\s*", RegexOptions.Singleline)] + private static partial Regex SummaryRegex(); +} diff --git a/tools/LlmsDocsGenerator/ComponentInfo.cs b/tools/LlmsDocsGenerator/ComponentInfo.cs new file mode 100644 index 00000000000..4c7ac9cd085 --- /dev/null +++ b/tools/LlmsDocsGenerator/ComponentInfo.cs @@ -0,0 +1,139 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License +// See the LICENSE file in the project root for more information. +// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone + +namespace LlmsDocsGenerator; + +/// +/// Represents information about a Blazor component +/// +public class ComponentInfo +{ + /// + /// Component name (e.g., "Table", "Button") + /// + public string Name { get; set; } = string.Empty; + + /// + /// Full type name including namespace + /// + public string FullName { get; set; } = string.Empty; + + /// + /// XML documentation summary + /// + public string? Summary { get; set; } + + /// + /// Generic type parameters (e.g., "TItem", "TValue") + /// + public List TypeParameters { get; set; } = new(); + + /// + /// Component parameters ([Parameter] properties) + /// + public List Parameters { get; set; } = new(); + + /// + /// Public methods + /// + public List PublicMethods { get; set; } = new(); + + /// + /// Base class name + /// + public string? BaseClass { get; set; } + + /// + /// Source file path + /// + public string SourcePath { get; set; } = string.Empty; + + /// + /// Last modification time of the source file + /// + public DateTime LastModified { get; set; } + + /// + /// Related sample file path (if exists) + /// + public string? SamplePath { get; set; } +} + +/// +/// Represents a component parameter +/// +public class ParameterInfo +{ + /// + /// Parameter name + /// + public string Name { get; set; } = string.Empty; + + /// + /// Parameter type as string + /// + public string Type { get; set; } = string.Empty; + + /// + /// Default value (if any) + /// + public string? DefaultValue { get; set; } + + /// + /// XML documentation summary + /// + public string? Description { get; set; } + + /// + /// Whether this is an EditorRequired parameter + /// + public bool IsRequired { get; set; } + + /// + /// Whether this parameter is obsolete + /// + public bool IsObsolete { get; set; } + + /// + /// Obsolete message (if obsolete) + /// + public string? ObsoleteMessage { get; set; } + + /// + /// Whether this is an EventCallback + /// + public bool IsEventCallback { get; set; } +} + +/// +/// Represents a public method +/// +public class MethodInfo +{ + /// + /// Method name + /// + public string Name { get; set; } = string.Empty; + + /// + /// Return type + /// + public string ReturnType { get; set; } = string.Empty; + + /// + /// Method parameters + /// + public List<(string Type, string Name)> Parameters { get; set; } = new(); + + /// + /// XML documentation summary + /// + public string? Description { get; set; } + + /// + /// Whether this is a JSInvokable method + /// + public bool IsJSInvokable { get; set; } +} diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs new file mode 100644 index 00000000000..97db6831749 --- /dev/null +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -0,0 +1,259 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License +// See the LICENSE file in the project root for more information. +// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone + +namespace LlmsDocsGenerator; + +/// +/// Main documentation generator class +/// +public class DocsGenerator +{ + private readonly string _outputPath; + private readonly string _sourcePath; + private readonly ComponentAnalyzer _analyzer; + private readonly MarkdownBuilder _markdownBuilder; + + public DocsGenerator(string outputPath) + { + _outputPath = Path.GetFullPath(outputPath); + + // Find the source directory (relative to tool location or current directory) + _sourcePath = FindSourcePath(); + + _analyzer = new ComponentAnalyzer(_sourcePath); + _markdownBuilder = new MarkdownBuilder(); + } + + private string FindSourcePath() + { + // Try to find src/BootstrapBlazor from current directory or parent directories + var current = Directory.GetCurrentDirectory(); + + for (int i = 0; i < 5; i++) + { + var srcPath = Path.Combine(current, "src", "BootstrapBlazor"); + if (Directory.Exists(srcPath)) + { + return srcPath; + } + + var parent = Directory.GetParent(current); + if (parent == null) break; + current = parent.FullName; + } + + throw new DirectoryNotFoundException( + "Could not find src/BootstrapBlazor directory. " + + "Please run this tool from the BootstrapBlazor repository root."); + } + + /// + /// Generate all documentation files + /// + public async Task GenerateAllAsync() + { + Console.WriteLine($"Source path: {_sourcePath}"); + Console.WriteLine($"Output path: {_outputPath}"); + Console.WriteLine(); + + // Analyze all components + Console.WriteLine("Analyzing components..."); + var components = await _analyzer.AnalyzeAllComponentsAsync(); + Console.WriteLine($"Found {components.Count} components"); + Console.WriteLine(); + + // Group components by category + var categorized = CategorizeComponents(components); + + // Generate index file + await GenerateIndexAsync(categorized); + + // Generate component documentation files + foreach (var category in categorized) + { + Console.WriteLine($"Generating {category.Key} documentation..."); + await GenerateCategoryDocAsync(category.Key, category.Value); + } + + Console.WriteLine(); + Console.WriteLine("Documentation generation complete!"); + } + + /// + /// Generate only the index file + /// + public async Task GenerateIndexAsync() + { + var components = await _analyzer.AnalyzeAllComponentsAsync(); + var categorized = CategorizeComponents(components); + await GenerateIndexAsync(categorized); + } + + private async Task GenerateIndexAsync(Dictionary> categorized) + { + var indexPath = Path.Combine(_outputPath, "llms.txt"); + var content = _markdownBuilder.BuildIndex(categorized); + await File.WriteAllTextAsync(indexPath, content); + Console.WriteLine($"Generated: {indexPath}"); + } + + /// + /// Generate documentation for a specific component + /// + public async Task GenerateComponentAsync(string componentName) + { + var component = await _analyzer.AnalyzeComponentAsync(componentName); + if (component == null) + { + Console.WriteLine($"Component not found: {componentName}"); + return; + } + + var content = _markdownBuilder.BuildComponentDoc(component); + var fileName = $"llms-{componentName.ToLowerInvariant()}.txt"; + var filePath = Path.Combine(_outputPath, fileName); + await File.WriteAllTextAsync(filePath, content); + Console.WriteLine($"Generated: {filePath}"); + } + + /// + /// Check if documentation is up-to-date + /// + public async Task CheckAsync() + { + Console.WriteLine("Checking documentation freshness..."); + + var components = await _analyzer.AnalyzeAllComponentsAsync(); + var categorized = CategorizeComponents(components); + + // Check index file + var indexPath = Path.Combine(_outputPath, "llms.txt"); + if (!File.Exists(indexPath)) + { + Console.WriteLine("OUTDATED: llms.txt does not exist"); + return false; + } + + // Check each category file + foreach (var category in categorized) + { + var fileName = GetCategoryFileName(category.Key); + var filePath = Path.Combine(_outputPath, fileName); + + if (!File.Exists(filePath)) + { + Console.WriteLine($"OUTDATED: {fileName} does not exist"); + return false; + } + + // Check if any source file is newer than the doc file + var docLastWrite = File.GetLastWriteTimeUtc(filePath); + foreach (var component in category.Value) + { + if (component.LastModified > docLastWrite) + { + Console.WriteLine($"OUTDATED: {component.Name} was modified after {fileName}"); + return false; + } + } + } + + Console.WriteLine("Documentation is up-to-date"); + return true; + } + + private Dictionary> CategorizeComponents(List components) + { + var categories = new Dictionary> + { + ["table"] = new(), + ["input"] = new(), + ["select"] = new(), + ["button"] = new(), + ["dialog"] = new(), + ["nav"] = new(), + ["card"] = new(), + ["treeview"] = new(), + ["form"] = new(), + ["other"] = new() + }; + + foreach (var component in components) + { + var category = GetComponentCategory(component.Name); + if (categories.ContainsKey(category)) + { + categories[category].Add(component); + } + else + { + categories["other"].Add(component); + } + } + + // Remove empty categories + return categories.Where(c => c.Value.Count > 0) + .ToDictionary(c => c.Key, c => c.Value); + } + + private string GetComponentCategory(string componentName) + { + return componentName.ToLowerInvariant() switch + { + // Table family + var n when n.Contains("table") => "table", + + // Input family + var n when n.Contains("input") || n.Contains("textarea") || + n.Contains("password") || n == "otpinput" => "input", + + // Select family + var n when n.Contains("select") || n.Contains("dropdown") || + n.Contains("autocomplete") || n.Contains("cascader") || + n.Contains("transfer") || n.Contains("multiselect") => "select", + + // Button family + var n when n.Contains("button") || n == "gotop" || + n.Contains("popconfirm") => "button", + + // Dialog family + var n when n.Contains("dialog") || n.Contains("modal") || + n.Contains("drawer") || n.Contains("swal") || + n.Contains("toast") || n.Contains("message") => "dialog", + + // Navigation family + var n when n.Contains("menu") || n.Contains("tab") || + n.Contains("breadcrumb") || n.Contains("step") || + n.Contains("anchor") || n.Contains("nav") => "nav", + + // Card/Container family + var n when n.Contains("card") || n.Contains("collapse") || + n.Contains("groupbox") || n.Contains("panel") => "card", + + // TreeView + var n when n.Contains("tree") => "treeview", + + // Form + var n when n.Contains("validateform") || n.Contains("editorform") || + n.Contains("validator") => "form", + + _ => "other" + }; + } + + private string GetCategoryFileName(string category) + { + return $"llms-{category}.txt"; + } + + private async Task GenerateCategoryDocAsync(string category, List components) + { + var fileName = GetCategoryFileName(category); + var filePath = Path.Combine(_outputPath, fileName); + var content = _markdownBuilder.BuildCategoryDoc(category, components); + await File.WriteAllTextAsync(filePath, content); + Console.WriteLine($"Generated: {filePath}"); + } +} diff --git a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj new file mode 100644 index 00000000000..94a286763d9 --- /dev/null +++ b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj @@ -0,0 +1,16 @@ + + + + Exe + net8.0 + enable + enable + LlmsDocsGenerator + + + + + + + + diff --git a/tools/LlmsDocsGenerator/MarkdownBuilder.cs b/tools/LlmsDocsGenerator/MarkdownBuilder.cs new file mode 100644 index 00000000000..1d7f0a4b59d --- /dev/null +++ b/tools/LlmsDocsGenerator/MarkdownBuilder.cs @@ -0,0 +1,374 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License +// See the LICENSE file in the project root for more information. +// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone + +using System.Text; + +namespace LlmsDocsGenerator; + +/// +/// Builds Markdown documentation for components +/// +public class MarkdownBuilder +{ + private const string GitHubBaseUrl = "https://github.com/dotnetcore/BootstrapBlazor/blob/main/"; + private readonly StringBuilder _sb = new(); + + /// + /// Build the main llms.txt index file + /// + public string BuildIndex(Dictionary> categorizedComponents) + { + _sb.Clear(); + + _sb.AppendLine("# BootstrapBlazor"); + _sb.AppendLine(); + _sb.AppendLine("> Enterprise-class Blazor UI component library based on Bootstrap 5"); + _sb.AppendLine(); + + // Quick Start section + _sb.AppendLine("## Quick Start"); + _sb.AppendLine(); + _sb.AppendLine("```bash"); + _sb.AppendLine("dotnet add package BootstrapBlazor"); + _sb.AppendLine("```"); + _sb.AppendLine(); + _sb.AppendLine("### Configuration"); + _sb.AppendLine(); + _sb.AppendLine("```csharp"); + _sb.AppendLine("// Program.cs"); + _sb.AppendLine("builder.Services.AddBootstrapBlazor();"); + _sb.AppendLine("```"); + _sb.AppendLine(); + _sb.AppendLine("```razor"); + _sb.AppendLine("@* _Imports.razor *@"); + _sb.AppendLine("@using BootstrapBlazor.Components"); + _sb.AppendLine("```"); + _sb.AppendLine(); + _sb.AppendLine("```html"); + _sb.AppendLine(""); + _sb.AppendLine(""); + _sb.AppendLine(""); + _sb.AppendLine("```"); + _sb.AppendLine(); + + // Component Categories + _sb.AppendLine("## Component Categories"); + _sb.AppendLine(); + _sb.AppendLine("For detailed documentation, refer to the specific llms-{category}.txt files."); + _sb.AppendLine(); + + var categoryDescriptions = new Dictionary + { + ["table"] = ("Data Display - Table", "Complex data table with sorting, filtering, paging, editing"), + ["input"] = ("Form Inputs", "Text input, number input, textarea, date picker"), + ["select"] = ("Selection Components", "Select, multi-select, autocomplete, cascader, transfer"), + ["button"] = ("Buttons", "Button, button group, dropdown button, split button"), + ["dialog"] = ("Dialogs & Feedback", "Modal, drawer, dialog service, message, toast"), + ["nav"] = ("Navigation", "Menu, tabs, breadcrumb, steps, pagination"), + ["card"] = ("Containers", "Card, collapse, group box, split, layout"), + ["treeview"] = ("Tree Components", "TreeView, tree select"), + ["form"] = ("Form Validation", "ValidateForm, editor form, validation rules"), + ["other"] = ("Other Components", "Miscellaneous components") + }; + + foreach (var (category, components) in categorizedComponents.OrderBy(c => c.Key)) + { + if (components.Count == 0) continue; + + var (title, description) = categoryDescriptions.GetValueOrDefault(category, (category, "")); + _sb.AppendLine($"### {title}"); + _sb.AppendLine($"→ See: llms-{category}.txt"); + _sb.AppendLine(); + _sb.AppendLine($"{description}"); + _sb.AppendLine(); + _sb.AppendLine("Components: " + string.Join(", ", components.Take(10).Select(c => c.Name))); + if (components.Count > 10) + { + _sb.AppendLine($" ... and {components.Count - 10} more"); + } + _sb.AppendLine(); + } + + // Source Code Reference + _sb.AppendLine("## Source Code Reference"); + _sb.AppendLine(); + _sb.AppendLine("GitHub Repository: https://github.com/dotnetcore/BootstrapBlazor"); + _sb.AppendLine(); + _sb.AppendLine("When documentation is insufficient, consult the source code:"); + _sb.AppendLine(); + _sb.AppendLine("### File Structure"); + _sb.AppendLine(); + _sb.AppendLine("```"); + _sb.AppendLine($"{GitHubBaseUrl}src/BootstrapBlazor/Components/{{ComponentName}}/"); + _sb.AppendLine("├── {Component}.razor # Razor template"); + _sb.AppendLine("├── {Component}.razor.cs # Component logic & parameters"); + _sb.AppendLine("├── {Component}Base.cs # Base class (if exists)"); + _sb.AppendLine("├── {Component}Option.cs # Configuration options"); + _sb.AppendLine("└── {Component}Service.cs # Service class (Dialog, Toast, etc.)"); + _sb.AppendLine("```"); + _sb.AppendLine(); + _sb.AppendLine("### Examples"); + _sb.AppendLine(); + _sb.AppendLine("```"); + _sb.AppendLine($"{GitHubBaseUrl}src/BootstrapBlazor.Server/Components/Samples/{{ComponentName}}s.razor"); + _sb.AppendLine("```"); + _sb.AppendLine(); + _sb.AppendLine("### Reading Component Parameters"); + _sb.AppendLine(); + _sb.AppendLine("Look for properties with `[Parameter]` attribute:"); + _sb.AppendLine(); + _sb.AppendLine("```csharp"); + _sb.AppendLine("/// "); + _sb.AppendLine("/// Gets or sets whether to show the toolbar"); + _sb.AppendLine("/// "); + _sb.AppendLine("[Parameter]"); + _sb.AppendLine("public bool ShowToolbar { get; set; }"); + _sb.AppendLine("```"); + _sb.AppendLine(); + + // Footer + _sb.AppendLine("---"); + _sb.AppendLine($"Generated: {DateTime.UtcNow:yyyy-MM-dd}"); + _sb.AppendLine($"Repository: {GitHubBaseUrl}"); + + return _sb.ToString(); + } + + /// + /// Build documentation for a category of components + /// + public string BuildCategoryDoc(string category, List components) + { + _sb.Clear(); + + var categoryTitles = new Dictionary + { + ["table"] = "Table Components", + ["input"] = "Input Components", + ["select"] = "Selection Components", + ["button"] = "Button Components", + ["dialog"] = "Dialog & Feedback Components", + ["nav"] = "Navigation Components", + ["card"] = "Container Components", + ["treeview"] = "Tree Components", + ["form"] = "Form Components", + ["other"] = "Other Components" + }; + + var title = categoryTitles.GetValueOrDefault(category, $"{category} Components"); + + _sb.AppendLine($"# BootstrapBlazor {title}"); + _sb.AppendLine(); + _sb.AppendLine($"> Auto-generated parameter reference for {category} components"); + _sb.AppendLine(); + + // Table of contents + _sb.AppendLine("## Components"); + _sb.AppendLine(); + foreach (var component in components.OrderBy(c => c.Name)) + { + _sb.AppendLine($"- [{component.Name}](#{component.Name.ToLowerInvariant()})"); + } + _sb.AppendLine(); + + // Each component + foreach (var component in components.OrderBy(c => c.Name)) + { + BuildComponentSection(component); + } + + // Footer + _sb.AppendLine("---"); + _sb.AppendLine(""); + _sb.AppendLine($""); + + return _sb.ToString(); + } + + /// + /// Build documentation for a single component + /// + public string BuildComponentDoc(ComponentInfo component) + { + _sb.Clear(); + + _sb.AppendLine($"# BootstrapBlazor {component.Name}"); + _sb.AppendLine(); + + if (!string.IsNullOrEmpty(component.Summary)) + { + _sb.AppendLine($"> {component.Summary}"); + _sb.AppendLine(); + } + + BuildComponentSection(component, includeHeader: false); + + // Footer + _sb.AppendLine("---"); + _sb.AppendLine($""); + + return _sb.ToString(); + } + + private void BuildComponentSection(ComponentInfo component, bool includeHeader = true) + { + if (includeHeader) + { + _sb.AppendLine($"## {component.Name}"); + _sb.AppendLine(); + + if (!string.IsNullOrEmpty(component.Summary)) + { + _sb.AppendLine(component.Summary); + _sb.AppendLine(); + } + } + + // Type parameters + if (component.TypeParameters.Count > 0) + { + _sb.AppendLine("### Type Parameters"); + _sb.AppendLine(); + foreach (var tp in component.TypeParameters) + { + _sb.AppendLine($"- `{tp}` - Generic type parameter"); + } + _sb.AppendLine(); + } + + // Base class info + if (!string.IsNullOrEmpty(component.BaseClass)) + { + _sb.AppendLine($"**Inherits from**: `{component.BaseClass}`"); + _sb.AppendLine(); + } + + // Parameters table + if (component.Parameters.Count > 0) + { + _sb.AppendLine("### Parameters"); + _sb.AppendLine(); + _sb.AppendLine(""); + _sb.AppendLine(); + _sb.AppendLine("| Parameter | Type | Default | Description |"); + _sb.AppendLine("|-----------|------|---------|-------------|"); + + // Sort: required first, then events, then alphabetically + var sortedParams = component.Parameters + .OrderByDescending(p => p.IsRequired) + .ThenBy(p => p.IsEventCallback) + .ThenBy(p => p.Name); + + foreach (var param in sortedParams) + { + var required = param.IsRequired ? " **[Required]**" : ""; + var description = EscapeMarkdownCell(param.Description ?? "") + required; + var defaultVal = param.DefaultValue ?? "-"; + var type = EscapeMarkdownCell(param.Type); + + _sb.AppendLine($"| {param.Name} | `{type}` | {defaultVal} | {description} |"); + } + + _sb.AppendLine(); + _sb.AppendLine(""); + _sb.AppendLine(); + } + + // Event callbacks (separate section for clarity) + var eventCallbacks = component.Parameters.Where(p => p.IsEventCallback).ToList(); + if (eventCallbacks.Count > 0) + { + _sb.AppendLine("### Event Callbacks"); + _sb.AppendLine(); + _sb.AppendLine("| Event | Type | Description |"); + _sb.AppendLine("|-------|------|-------------|"); + + foreach (var evt in eventCallbacks.OrderBy(e => e.Name)) + { + var description = EscapeMarkdownCell(evt.Description ?? ""); + var type = EscapeMarkdownCell(evt.Type); + _sb.AppendLine($"| {evt.Name} | `{type}` | {description} |"); + } + + _sb.AppendLine(); + } + + // Public methods + if (component.PublicMethods.Count > 0) + { + _sb.AppendLine("### Public Methods"); + _sb.AppendLine(); + + foreach (var method in component.PublicMethods.OrderBy(m => m.Name)) + { + var paramStr = string.Join(", ", method.Parameters.Select(p => $"{p.Item1} {p.Item2}")); + _sb.AppendLine($"- `{method.ReturnType} {method.Name}({paramStr})`"); + if (!string.IsNullOrEmpty(method.Description)) + { + _sb.AppendLine($" - {method.Description}"); + } + if (method.IsJSInvokable) + { + _sb.AppendLine(" - *[JSInvokable]*"); + } + } + + _sb.AppendLine(); + } + + // Source reference with GitHub URLs + if (!string.IsNullOrEmpty(component.SourcePath)) + { + _sb.AppendLine("### Source"); + _sb.AppendLine(); + var sourceUrl = $"{GitHubBaseUrl}{component.SourcePath}"; + _sb.AppendLine($"- Component: [{component.SourcePath}]({sourceUrl})"); + if (!string.IsNullOrEmpty(component.SamplePath)) + { + var sampleUrl = $"{GitHubBaseUrl}{component.SamplePath}"; + _sb.AppendLine($"- Examples: [{component.SamplePath}]({sampleUrl})"); + } + _sb.AppendLine(); + } + } + + /// + /// Build a minimal parameter table for embedding in existing docs + /// + public string BuildParameterTable(List parameters) + { + _sb.Clear(); + + _sb.AppendLine("| Parameter | Type | Default | Description |"); + _sb.AppendLine("|-----------|------|---------|-------------|"); + + var sortedParams = parameters + .OrderByDescending(p => p.IsRequired) + .ThenBy(p => p.IsEventCallback) + .ThenBy(p => p.Name); + + foreach (var param in sortedParams) + { + var required = param.IsRequired ? " **[Required]**" : ""; + var description = EscapeMarkdownCell(param.Description ?? "") + required; + var defaultVal = param.DefaultValue ?? "-"; + var type = EscapeMarkdownCell(param.Type); + + _sb.AppendLine($"| {param.Name} | `{type}` | {defaultVal} | {description} |"); + } + + return _sb.ToString(); + } + + private static string EscapeMarkdownCell(string text) + { + if (string.IsNullOrEmpty(text)) return ""; + + return text + .Replace("|", "\\|") + .Replace("\n", " ") + .Replace("\r", ""); + } +} diff --git a/tools/LlmsDocsGenerator/Program.cs b/tools/LlmsDocsGenerator/Program.cs new file mode 100644 index 00000000000..c5853fb7c7e --- /dev/null +++ b/tools/LlmsDocsGenerator/Program.cs @@ -0,0 +1,60 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the Apache 2.0 License +// See the LICENSE file in the project root for more information. +// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone + +using System.CommandLine; +using LlmsDocsGenerator; + +var rootCommand = new RootCommand("BootstrapBlazor LLMs Documentation Generator"); + +var componentOption = new Option( + name: "--component", + description: "Generate documentation for a specific component only"); + +var indexOnlyOption = new Option( + name: "--index-only", + description: "Generate only the index file (llms.txt)"); + +var checkOption = new Option( + name: "--check", + description: "Check if documentation is up-to-date (for CI/CD)"); + +var outputOption = new Option( + name: "--output", + getDefaultValue: () => "src/BootstrapBlazor.Server/wwwroot/llmstxt", + description: "Output directory for generated files (default: src/BootstrapBlazor.Server/wwwroot/llmstxt)"); + +rootCommand.AddOption(componentOption); +rootCommand.AddOption(indexOnlyOption); +rootCommand.AddOption(checkOption); +rootCommand.AddOption(outputOption); + +rootCommand.SetHandler(async (component, indexOnly, check, output) => +{ + var generator = new DocsGenerator(output); + + if (check) + { + var isUpToDate = await generator.CheckAsync(); + Environment.ExitCode = isUpToDate ? 0 : 1; + return; + } + + if (indexOnly) + { + await generator.GenerateIndexAsync(); + return; + } + + if (!string.IsNullOrEmpty(component)) + { + await generator.GenerateComponentAsync(component); + return; + } + + await generator.GenerateAllAsync(); + +}, componentOption, indexOnlyOption, checkOption, outputOption); + +return await rootCommand.InvokeAsync(args); From 7f4664791aba2ed53d012a2f05fabe59fceb503b Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 11:23:10 +0800 Subject: [PATCH 02/34] feat(ComponentAnalyzer): simplify type name handling and add regex for Nullable --- tools/LlmsDocsGenerator/ComponentAnalyzer.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tools/LlmsDocsGenerator/ComponentAnalyzer.cs b/tools/LlmsDocsGenerator/ComponentAnalyzer.cs index 13ecbb66daa..dbb404a89a5 100644 --- a/tools/LlmsDocsGenerator/ComponentAnalyzer.cs +++ b/tools/LlmsDocsGenerator/ComponentAnalyzer.cs @@ -314,20 +314,29 @@ private string SimplifyDefaultValue(string value) private string SimplifyTypeName(string typeName) { - // Simplify common type names - return typeName + // Remove common namespace prefixes + var result = typeName .Replace("System.", "") .Replace("Collections.Generic.", "") - .Replace("Threading.Tasks.", "") - .Replace("Nullable<", "") - .Replace(">", "?") + .Replace("Threading.Tasks.", ""); + + // Handle Nullable -> T? (must be done carefully to not break other generics) + result = NullableRegex().Replace(result, "$1?"); + + // Simplify primitive type names + result = result .Replace("Int32", "int") .Replace("Int64", "long") .Replace("Boolean", "bool") .Replace("String", "string") .Replace("Object", "object"); + + return result; } + [GeneratedRegex(@"Nullable<([^>]+)>")] + private static partial Regex NullableRegex(); + private bool HasAttribute(MemberDeclarationSyntax member, string attributeName) { return member.AttributeLists From 1c289ee7ec5471a845a24e03c8cbfc1c18ada579 Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 11:23:47 +0800 Subject: [PATCH 03/34] fix: sync the llmstxt outputs --- .../wwwroot/llmstxt/llms-button.txt | 62 +-- .../wwwroot/llmstxt/llms-card.txt | 20 +- .../wwwroot/llmstxt/llms-dialog.txt | 40 +- .../wwwroot/llmstxt/llms-form.txt | 16 +- .../wwwroot/llmstxt/llms-input.txt | 16 +- .../wwwroot/llmstxt/llms-nav.txt | 88 ++-- .../wwwroot/llmstxt/llms-other.txt | 424 +++++++++--------- .../wwwroot/llmstxt/llms-select.txt | 152 +++---- .../wwwroot/llmstxt/llms-table.txt | 92 ++-- .../wwwroot/llmstxt/llms-treeview.txt | 60 +-- .../wwwroot/llmstxt/llms.txt | 2 +- 11 files changed, 486 insertions(+), 486 deletions(-) diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt index 9161f142a82..c6432bbf185 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt @@ -73,11 +73,11 @@ Button 按钮组件 | IsKeepDisabled | `bool` | - | 获得/设置 是否异步结束后是否保持禁用状态,默认为 false | | IsOutline | `bool` | - | 获得/设置 Outline 样式 默认 false | | LoadingIcon | `string?` | - | 获得/设置 正在加载动画图标 默认为 fa-solid fa-spin fa-spinner | -| OnClickWithoutRender | `Func?` | - | 获得/设置 OnClick 事件不刷新父组件 | | Size | `Size` | - | 获得/设置 Size 大小 | | StopPropagation | `bool` | - | 获得/设置 点击时间是否向上传播 默认 false | | Text | `string?` | - | 获得/设置 显示文字 | -| OnClick | `EventCallback` | - | 获得/设置 OnClick 事件 | @@ -85,7 +85,7 @@ Button 按钮组件 | Event | Type | Description | |-------|------|-------------| -| OnClick | `EventCallback` | 获得/设置 OnClick 事件 | ### Public Methods @@ -121,7 +121,7 @@ Button 按钮组件 | ChildContent | `RenderFragment?` | - | 获得/设置 子组件内容 | | InvalidStatusIcon | `string?` | - | 获得/设置 上传失败状态图标 | | LoadingIcon | `string?` | - | 获得/设置 浏览按钮加载中图标 | -| OnGetFileFormat | `Func?` | - | 获得/设置 设置文件格式图标回调委托 | | ShowUploadFileList | `bool` | true | 获得/设置 是否显示上传列表 默认 true | | Size | `Size` | - | 获得/设置 Size 大小 | | ValidStatusIcon | `string?` | - | 获得/设置 上传成功状态图标 | @@ -150,13 +150,13 @@ Button 按钮组件 | Icon | `string?` | - | 获得/设置 显示图标 | | IsAutoClose | `bool` | true | 获得/设置 是否自动关闭弹窗 默认为 true | | IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | -| Items | `IEnumerable?` | - | 展开项集合 | +| ItemTemplate | `RenderFragment?` | - | 展开部分模板 | | Offset | `float` | 8 | 获得/设置 弹窗便宜量 默认 8px | | Placement | `Placement` | - | 获得/设置 位置 | | Radius | `int` | 75 | 获得/设置 时扇形分布半径值 默认 75; | | Size | `Size` | - | 获得/设置 Size 大小 | -| OnClick | `EventCallback` | - | 获得/设置 OnClick 事件 | @@ -164,7 +164,7 @@ Button 按钮组件 | Event | Type | Description | |-------|------|-------------| -| OnClick | `EventCallback` | 获得/设置 OnClick 事件 | ### Source @@ -189,7 +189,7 @@ FilterButton 组件 |-----------|------|---------|-------------| | ClearIcon | `string?` | - | 获得/设置 重置按钮图标 | | FilterIcon | `string?` | - | 获得/设置 过滤按钮图标 | -| OnClearFilter | `Func?` | - | 获得/设置 清除过滤条件时的回调方法 | @@ -299,9 +299,9 @@ PopConfirmButton 组件 | Content | `string?` | - | 获得/设置 显示文字 | | CustomClass | `string?` | - | 获得/设置 自定义样式 默认 null | | IsLink | `bool` | - | 获得/设置 是否为 A 标签 默认 false 使用 button 渲染 | -| OnBeforeClick | `Func>?` | - | 获得/设置 点击确认弹窗前回调方法 返回真时弹出弹窗 返回假时不弹出 默认 null | +| OnClose | `Func?` | - | 获得/设置 点击关闭时回调方法 | +| OnConfirm | `Func?` | - | 获得/设置 点击确认时回调方法 | | Placement | `Placement` | - | 获得/设置 弹窗显示位置 默认 | | ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 | | ShowConfirmButton | `bool` | true | 获得/设置 是否显示确认按钮 | @@ -340,8 +340,8 @@ Popover Confirm 组件 | ConfirmButtonText | `string?` | - | 获得/设置 确认按钮显示文字 | | Content | `string?` | - | 获得/设置 显示文字 | | Icon | `string?` | - | 获得/设置 确认框图标 | -| OnClose | `Func?` | - | 获得/设置 确认按钮回调方法 | +| OnConfirm | `Func?` | - | 获得/设置 确认按钮回调方法 | | ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 | | ShowConfirmButton | `bool` | true | 获得/设置 是否显示确认按钮 | | Title | `string?` | - | 获得/设置 显示标题 | @@ -408,7 +408,7 @@ SlideButton 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | BodyTemplate | `RenderFragment?` | - | 获得/设置 展开部分模板 | -| ButtonItemTemplate | `RenderFragment?` | - | 获得/设置 展开按钮项模板 | | ButtonTemplate | `RenderFragment?` | - | 获得/设置 按钮模板 | | Color | `Color` | Color.Primary | 获得/设置 按钮颜色 | | HeaderTemplate | `RenderFragment?` | - | 获得/设置 Header 部分模板 | @@ -416,14 +416,14 @@ SlideButton 组件 | Icon | `string?` | - | 获得/设置 显示图标 | | IsAutoClose | `bool` | true | 获得/设置 是否自动关闭弹窗 默认为 true | | IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | -| Items | `IEnumerable?` | - | 获得/设置 展开项集合 | | Offset | `float` | 8 | 获得/设置 弹窗偏移量 默认 8px | | Placement | `Placement` | - | 获得/设置 按钮颜色 | | ShowHeader | `bool` | - | 获得/设置 是否显示标题 默认 false 不显示 | | Size | `Size` | - | 获得/设置 Size 大小 | | SlideButtonItems | `RenderFragment?` | - | 获得/设置 数据项模板 | | Text | `string?` | - | 获得/设置 显示文本 | -| OnClick | `EventCallback` | - | 获得/设置 OnClick 事件 | @@ -431,7 +431,7 @@ SlideButton 组件 | Event | Type | Description | |-------|------|-------------| -| OnClick | `EventCallback` | 获得/设置 OnClick 事件 | ### Source @@ -451,8 +451,8 @@ Switch Button | OffText | `string?` | - | 获得/设置 Off 状态显示文字 | | OnText | `string?` | - | 获得/设置 On 状态显示文字 | | ToggleState | `bool` | - | 获得/设置 当前状态 | -| OnClick | `EventCallback` | - | 点击回调方法 | +| ToggleStateChanged | `EventCallback` | - | 状态切换回调方法 | @@ -460,8 +460,8 @@ Switch Button | Event | Type | Description | |-------|------|-------------| -| OnClick | `EventCallback` | 点击回调方法 | +| ToggleStateChanged | `EventCallback` | 状态切换回调方法 | ### Source @@ -479,7 +479,7 @@ TabToolbarButton component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Icon | `string?` | - | Gets or sets the button icon string. Default is null. | -| OnClickAsync | `Func?` | - | Gets or sets the button click event handler. Default is null. | | TooltipText | `string?` | - | Gets or sets the tooltip text. Default is null. | @@ -499,8 +499,8 @@ Toggle Button 按钮组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | IsActive | `bool` | - | 获得/设置 当前状态是否为激活状态 默认 false | -| OnToggleAsync | `Func?` | - | 获得/设置 状态切换回调方法 | +| IsActiveChanged | `EventCallback` | - | 获得/设置 激活状态回调方法 | @@ -508,7 +508,7 @@ Toggle Button 按钮组件 | Event | Type | Description | |-------|------|-------------| -| IsActiveChanged | `EventCallback` | 获得/设置 激活状态回调方法 | ### Source @@ -549,11 +549,11 @@ TreeViewToolbarEditButton component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Icon | `string?` | - | Gets or sets the icon of the edit button. Default is null. | -| Item | `TreeViewItemIf return true will update the tree text value, otherwise will not update. | +| Item | `TreeViewItem?` | - | Gets or sets the tree view item. Default is null. | +| OnUpdateCallbackAsync | `Func>?` | - | Gets or sets the update the tree text value callback. Default is null. If return true will update the tree text value, otherwise will not update. | | Text | `string?` | - | Gets or sets the text of the popup-window label. Default is null. | | Title | `string?` | - | Gets or sets the title of the popup-window. Default is null. | -| ItemChanged | `EventCallback>` | - | Gets or sets the item changed event callback. | @@ -561,7 +561,7 @@ TreeViewToolbarEditButton component | Event | Type | Description | |-------|------|-------------| -| ItemChanged | `EventCallback>` | Gets or sets the item changed event callback. | ### Source @@ -569,4 +569,4 @@ TreeViewToolbarEditButton component --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt index 8141e6d2e66..18cc3abf3b6 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt @@ -30,7 +30,7 @@ Card 组件 | IsCenter | `bool` | - | 获得/设置 是否居中 默认 false | | IsCollapsible | `bool` | - | 获得/设置 是否可收缩 默认 false | | IsShadow | `bool` | - | 获得/设置 是否显示阴影 默认 false | -| CollapsedChanged | `EventCallback` | - | 获得/设置 是否收缩 默认 false 展开 | @@ -38,7 +38,7 @@ Card 组件 | Event | Type | Description | |-------|------|-------------| -| CollapsedChanged | `EventCallback` | 获得/设置 是否收缩 默认 false 展开 | ### Public Methods @@ -65,14 +65,14 @@ CardUpload component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| ActionButtonTemplate | `RenderFragment?` | - | 获得/设置 操作按钮模板 | | AddIcon | `string?` | - | 获得/设置 新建图标 | -| AllowExtensions | `List?` | - | 获得/设置 图标文件扩展名集合 ".png" | +| BeforeActionButtonTemplate | `RenderFragment?` | - | 获得/设置 操作按钮模板 | +| CanPreviewCallback | `Func?` | - | 获得/设置 是否允许预览回调方法 默认 null | +| IconTemplate | `RenderFragment?` | - | 获得/设置 图标模板 | | IsUploadButtonAtFirst | `bool` | - | 获得/设置 继续上传按钮是否在列表前 默认 false | -| OnZoomAsync | `Func?` | - | 获得/设置 点击 Zoom 图标回调方法 | | RemoveIcon | `string?` | - | 获得/设置 移除图标 | | ShowFileSize | `bool` | true | 获得/设置 是否显示文件尺寸,默认为 true 显示 | | ShowZoomButton | `bool` | true | 获得/设置 是否显示放大按钮 默认 true | @@ -97,7 +97,7 @@ Collapse 组件 |-----------|------|---------|-------------| | CollapseItems | `RenderFragment?` | - | 获得/设置 CollapseItems 模板 | | IsAccordion | `bool` | - | 获得/设置 是否为手风琴效果 默认为 false | -| OnCollapseChanged | `Func?` | - | 获得/设置 CollapseItem 展开收缩时回调方法 | @@ -125,4 +125,4 @@ Collapse 组件 --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt index fa753efe4bc..8388a94754c 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt @@ -32,8 +32,8 @@ Dialog 组件基类 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 BodyTemplate 实例 | +| Items | `IEnumerable?` | - | 获得 数据项集合 | | ItemsPerRow | `int?` | - | 获得/设置 每行显示组件数量 默认为 null | | LabelAlign | `Alignment` | - | 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 | | Model | `TModel?` | - | 获得/设置 EditModel 实例 | @@ -65,14 +65,14 @@ Drawer component | IsBackdrop | `bool` | - | 获得/设置 点击遮罩是否关闭抽屉 默认为 false | | IsKeyboard | `bool` | - | 获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 false | | IsOpen | `bool` | - | 获得/设置 抽屉是否打开 默认 false 未打开 | -| OnClickBackdrop | `Func?` | - | 获得/设置 点击背景遮罩时回调委托方法 默认为 null | +| OnCloseAsync | `Func?` | - | 获得/设置 关闭抽屉回调委托 默认 null | | Placement | `Placement` | Placement.Left | 获得/设置 组件出现位置 默认显示在 Left 位置 | | Position | `string?` | - | 获得/设置 组件定位位置 默认 null 未设置 使用样式内置定位 fixed 可更改为 absolute | | ShowBackdrop | `bool` | true | 获得/设置 是否显示遮罩 默认为 true 显示遮罩 | | Width | `string` | "360px" | 获得/设置 抽屉宽度 左右布局时生效 | | ZIndex | `int?` | - | 获得/设置 z-index 参数值 默认 null 未设置 | -| IsOpenChanged | `EventCallback` | - | 获得/设置 IsOpen 属性改变时回调委托方法 | @@ -80,7 +80,7 @@ Drawer component | Event | Type | Description | |-------|------|-------------| -| IsOpenChanged | `EventCallback` | 获得/设置 IsOpen 属性改变时回调委托方法 | ### Public Methods @@ -112,11 +112,11 @@ Drawer component | CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 | | CloseButtonText | `string?` | - | 获得/设置 获得/设置 重置按钮文本 | | DisableAutoSubmitFormByEnter | `bool?` | - | 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 | -| FooterTemplate | `RenderFragment?` | - | 获得/设置 DialogFooterTemplate 实例 | | IsTracking | `bool` | - | 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false | | ItemChangedType | `ItemChangedType` | - | 获得/设置 实体类编辑模式 Add 还是 Update | -| OnCloseAsync | `Func?` | - | 获得/设置 关闭弹窗回调方法 | +| OnSaveAsync | `Func>?` | - | 获得/设置 保存回调委托 返回 false 时保持编辑弹窗 返回 true 时关闭编辑弹窗 | | SaveButtonIcon | `string?` | - | 获得/设置 保存按钮图标 | | SaveButtonText | `string?` | - | 获得/设置 保存按钮文本 | | ShowLoading | `bool` | - | 获得/设置 查询时是否显示正在加载中动画 默认为 false | @@ -196,12 +196,12 @@ Modal component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | ChildContent | `RenderFragment?` | - | Gets or sets the child component | -| FirstAfterRenderCallbackAsync | `Func?` | - | Gets or sets the callback method when the component has finished rendering | | IsBackdrop | `bool` | - | Gets or sets whether to close the popup in the background, default is false | | IsFade | `bool?` | - | Gets or sets whether to enable fade in and out animation, default is null | | IsKeyboard | `bool` | true | Gets or sets whether to enable keyboard support, default is true to respond to the ESC key | -| OnCloseAsync | `Func?` | - | Gets or sets the callback delegate when the popup is closed | +| OnShownAsync | `Func?` | - | Gets or sets the callback method when the popup is shown | @@ -212,7 +212,7 @@ Modal component - `Task CloseCallback()` - Callback method when the popup has been closed, called by JSInvoke - *[JSInvokable]* -- `void RegisterShownCallback(IComponent component, Func value)` - Registers a callback method to be called after the popup is shown, equivalent to setting the OnShownAsync parameter - `void SetHeaderText(string text)` - Method to set the header text @@ -252,7 +252,7 @@ ModalDialog 组件 | FooterContentTemplate | `RenderFragment?` | - | Gets or sets the footer content template. Default is null. | | FooterTemplate | `RenderFragment?` | - | 获得/设置 ModalFooter 组件 | | FullScreenSize | `FullScreenSize` | - | 获得/设置 弹窗大小 默认为 | -| GetResultDialog | `Func?` | - | 获得/设置 获得模态弹窗方法 默认 null | | HeaderTemplate | `RenderFragment?` | - | 获得/设置 ModalHeader 组件 | | HeaderToolbarTemplate | `RenderFragment?` | - | 获得/设置 Header 中按钮模板 | | IsAutoCloseAfterSave | `bool` | true | 获得/设置 保存成功后是否自动关闭弹窗 默认 true 自动关闭 | @@ -261,12 +261,12 @@ ModalDialog 组件 | IsHidePreviousDialog | `bool` | - | Gets or sets whether to hide the previous dialog when opening a new one, default is false | | IsScrolling | `bool` | - | 获得/设置 是否弹窗正文超长时滚动 默认为 false | | MaximizeWindowIcon | `string?` | - | 获得/设置 最大化按钮图标 | -| OnSaveAsync | `Func true 时自动关闭弹窗 | +| OnSaveAsync | `Func>?` | - | 获得/设置 保存按钮回调委托 返回 true 并且设置 true 时自动关闭弹窗 | | PrintButtonColor | `Color` | Color.Primary | 获得/设置 打印按钮颜色 默认 Color.Primary | | PrintButtonIcon | `string?` | - | 获得/设置 打印按钮图标 未设置 取当前图标主题下打印图标 | | PrintButtonText | `string?` | - | 获得/设置 Header 中打印按钮显示文字 默认为资源文件中 打印 | | RestoreWindowIcon | `string?` | - | 获得/设置 恢复按钮图标 | -| ResultTask | `TaskCompletionSource 实例 默认 null | +| ResultTask | `TaskCompletionSource?` | - | 获得/设置 模态弹窗任务 实例 默认 null | | SaveButtonIcon | `string?` | - | 获得/设置 保存按钮显示图标 未设置时 使用主题图标 | | SaveButtonText | `string?` | - | 获得/设置 保存按钮显示文字 资源文件设置为 保存 | | ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 默认为 true 显示 | @@ -287,7 +287,7 @@ ModalDialog 组件 ### Public Methods -- `Task HandlerException(Exception ex, RenderFragment errorContent)` - - `void SetHeaderText(string text)` - 设置 Header 文字方法 @@ -336,8 +336,8 @@ ResultDialog 对话框类 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | ClearIcon | `string?` | - | 获得/设置 清空按钮图标 | -| OnResetSearchClick | `Func?` | - | 获得/设置 重置回调委托 | +| OnSearchClick | `Func?` | - | 获得/设置 搜索回调委托 | | QueryButtonText | `string?` | - | 获得/设置 查询按钮文本 | | ResetButtonText | `string?` | - | 获得/设置 重置按钮文本 | | SearchIcon | `string?` | - | 获得/设置 搜索按钮图标 | @@ -405,4 +405,4 @@ Toast 弹出窗组件 --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt index 46be5388fd4..a6cff035b64 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt @@ -25,13 +25,13 @@ |-----------|------|---------|-------------| | AutoGenerateAllItem | `bool` | true | 获得/设置 是否自动生成模型的所有属性 默认为 true 生成所有属性 | | Buttons | `RenderFragment?` | - | 获得/设置 按钮模板 | -| ColumnOrderCallback | `Func 时本参数不生效 | +| ColumnOrderCallback | `Func, IEnumerable>?` | - | 获得/设置 自定义列排序规则 默认 null 未设置 使用内部排序机制 1 2 3 0 -3 -2 -1 顺序 | +| FieldItems | `RenderFragment?` | - | 获得/设置 列模板 设置 时本参数不生效 | | IsDisplay | `bool` | - | 获得/设置 是否显示为 Display 组件 默认为 false | | IsRenderWhenValueChanged | `bool` | - | 获得/设置 当值变化时是否重新渲染组件 默认 false | | IsShowDisplayTooltip | `bool` | - | 获得/设置 是否显示 Display 组件的 Tooltip 默认为 false | | ItemChangedType | `ItemChangedType` | - | 获得/设置 实体类编辑模式 Add 还是 Update | -| Items | `IEnumerable 模板不生效 | +| Items | `IEnumerable?` | - | 获得/设置 级联上下文绑定字段信息集合 设置此参数后 模板不生效 | | ItemsPerRow | `int?` | - | 获得/设置 每行显示组件数量 默认为 null | | LabelAlign | `Alignment` | - | 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 | | LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | @@ -69,9 +69,9 @@ ValidateForm 组件类 | IsFormless | `bool` | - | 获得/设置 是否为无表单模式 默认 false | | LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | | Model | `object?` | - | Specifies the top-level model object for the form. An edit context will be constructed for this model. If using this parameter, do not also supply a value for . | -| OnFieldValueChanged | `Action is determined to be invalid. | -| OnValidSubmit | `Func is determined to be valid. | +| OnFieldValueChanged | `Action?` | - | A callback that will be invoked when the field's value has been changed | +| OnInvalidSubmit | `Func?` | - | A callback that will be invoked when the form is submitted and the is determined to be invalid. | +| OnValidSubmit | `Func?` | - | A callback that will be invoked when the form is submitted and the is determined to be valid. | | ShowAllInvalidResult | `bool` | - | 获得/设置 是否显示所有验证失败字段的提示信息 默认 false 仅显示第一个验证失败字段的提示信息 | | ShowLabel | `bool?` | - | 获得/设置 是否显示验证表单内的 Label 默认为 null | | ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null | @@ -84,7 +84,7 @@ ValidateForm 组件类 - `void NotifyFieldChanged(FieldIdentifier fieldIdentifier, object? value)` - 通知属性改变方法 -- `Task SetError(Expression> expression, string errorMessage)` - 设置指定字段错误信息 - `Task SetError(string propertyName, string errorMessage)` - 设置指定字段错误信息 @@ -98,4 +98,4 @@ ValidateForm 组件类 --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt index 4d7c87b8290..1687f83e94c 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt @@ -31,7 +31,7 @@ BootstrapInput 组件 | AutoSetDefaultWhenNull | `bool` | - | 获得/设置 用户删除后是否自动更改为默认值 0 默认 false | | ClearIcon | `string?` | - | 获得/设置 清空小按钮图标 默认 null | | IsClearable | `bool` | - | 获得/设置 是否显示清空小按钮 默认 false | -| OnClear | `Func?` | - | 获得/设置 清空文本框时回调方法 默认 null | | Readonly | `bool` | - | 获得/设置 是否为只读 默认 false | @@ -58,14 +58,14 @@ Base class for BootstrapInput components |-----------|------|---------|-------------| | Color | `Color` | Color.None | Gets or sets the button color | | FormatString | `string?` | - | Gets or sets the format string, e.g., "yyyy-MM-dd" for date types | -| Formatter | `Func?` | - | Gets or sets the formatter function | | IsAutoFocus | `bool` | - | Gets or sets whether to automatically focus, default is false | | IsSelectAllTextOnEnter | `bool` | - | Gets or sets whether to automatically select all text on Enter key press, default is false | | IsSelectAllTextOnFocus | `bool` | - | Gets or sets whether to automatically select all text on focus, default is false | | IsTrim | `bool` | - | Gets or sets whether to automatically trim whitespace, default is false | -| OnBlurAsync | `Func?` | - | Gets or sets the callback method for blur event, default is null | +| OnEnterAsync | `Func?` | - | Gets or sets the callback method for Enter key press, default is null | +| OnEscAsync | `Func?` | - | Gets or sets the callback method for Esc key press, default is null | | PlaceHolder | `string?` | - | Gets or sets the placeholder attribute value | @@ -162,8 +162,8 @@ An input component for editing numeric values. Supported numeric types are ?` | - | 获得/设置 数值减少时回调委托 | +| OnIncrement | `Func?` | - | 获得/设置 数值增加时回调委托 | | PlusIcon | `string?` | - | 获得/设置 增加数值图标 | | ShowButton | `bool` | - | 获得/设置 是否显示加减按钮 | | Step | `string?` | - | 获得/设置 步长 默认为 null | @@ -262,4 +262,4 @@ Textarea component --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt index dfebcd31d2c..d6b90e762d8 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt @@ -83,7 +83,7 @@ Breadcrumb 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Value | `IEnumerable?` | - | 获得/设置 数据集 | @@ -103,7 +103,7 @@ ContextMenu 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| OnBeforeShowCallback | `Func?` | - | 获得/设置 弹出前回调方法 默认 null | | ShowShadow | `bool` | true | 获得/设置 是否显示阴影 默认 true | @@ -141,7 +141,7 @@ ContextMenuZone 组件 |-----------|------|---------|-------------| | GotoText | `string?` | - | 获得/设置 跳转文本 默认 null | | Index | `int` | - | 获得/设置 跳转页码 默认 null | -| OnNavigation | `Func?` | - | 获得/设置 导航回调方法 默认 null | @@ -167,8 +167,8 @@ Menu 组件基类 | IsExpandAll | `bool` | - | 获得/设置 是否全部展开 默认为 false | | IsScrollIntoView | `bool` | true | 获得/设置 自动滚动到可视区域 默认 true 开启时生效 | | IsVertical | `bool` | - | 获得/设置 侧栏垂直模式 默认 false | -| Items | `IEnumerable?` | - | 获得/设置 菜单数据集合 | +| OnClick | `Func?` | - | 获得/设置 菜单项点击回调委托 | @@ -212,7 +212,7 @@ NavMenu 组件基类 | IsJustified | `bool` | - | 获得/设置 是否等宽 | | IsPills | `bool` | - | 获得/设置 是否为胶囊 | | IsVertical | `bool` | - | 获得/设置 是否垂直分布 | -| Items | `IEnumerable?` | - | 获得/设置 组件数据源 | @@ -347,14 +347,14 @@ RibbonTab 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | ChildContent | `RenderFragment?` | - | 获得/设置 内容模板 | -| DecodeAnchorCallback | `Func?` | - | 解码锚点回调方法 | +| EncodeAnchorCallback | `Func?` | - | 编码锚点回调方法 第一参数是当前地址 Url 第二个参数是当前选项 Text 属性 返回值为地址全路径 | | IsBorder | `bool` | true | 获得/设置 是否为带边框卡片样式 默认 true | | IsSupportAnchor | `bool` | - | 获得/设置 是否开启 Url 锚点 | -| Items | `IEnumerable?` | - | 获得/设置 数据源 | +| OnFloatChanged | `Func?` | - | 获得/设置 组件是否悬浮状态改变时回调方法 默认 null | +| OnItemClickAsync | `Func?` | - | 获得/设置 点击命令按钮回调方法 | +| OnMenuClickAsync | `Func?` | - | 获得/设置 点击标签 Menu 回调方法 | | RibbonArrowDownIcon | `string?` | - | 获得/设置 选项卡向下箭头图标 | | RibbonArrowPinIcon | `string?` | - | 获得/设置 选项卡可固定图标 | | RibbonArrowUpIcon | `string?` | - | 获得/设置 选项卡向上箭头图标 | @@ -386,13 +386,13 @@ Header 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | 获得/设置 数据源 **[Required]** | +| DecodeAnchorCallback | `Func?` | - | 解码锚点回调方法 | +| EncodeAnchorCallback | `Func?` | - | 编码锚点回调方法 第一参数是当前地址 Url 第二个参数是当前选项 Text 属性 返回值为地址全路径 | | IsSupportAnchor | `bool` | - | 获得/设置 是否开启 Url 锚点 | -| OnFloatChanged | `Func?` | - | 获得/设置 组件是否悬浮状态改变时回调方法 默认 null | +| OnItemClickAsync | `Func?` | - | 获得/设置 点击命令按钮回调方法 | +| OnMenuClickAsync | `Func?` | - | 获得/设置 点击标签 Menu 回调方法 | | RibbonArrowDownIcon | `string?` | - | 获得/设置 选项卡向下箭头图标 | | RibbonArrowPinIcon | `string?` | - | 获得/设置 选项卡可固定图标 | | RibbonArrowUpIcon | `string?` | - | 获得/设置 选项卡向上箭头图标 | @@ -424,8 +424,8 @@ SideMenu 组件 |-----------|------|---------|-------------| | ArrowIcon | `string?` | - | 获得/设置 菜单箭头图标 | | DropdownIcon | `string?` | - | 获得/设置 组件数据源 | -| Items | `IEnumerable?` | - | 获得/设置 菜单数据集合 | +| OnClick | `Func?` | - | 获得/设置 菜单项点击回调委托 | @@ -462,8 +462,8 @@ Step 组件类 | ChildContent | `RenderFragment?` | - | 获得/设置 组件内容实例 | | FinishedTemplate | `RenderFragment?` | - | 获得/设置 步骤全部完成时模板 默认 null | | IsVertical | `bool` | - | 获得/设置 是否垂直渲染 默认 false 水平渲染 | -| Items | `List?` | - | 获得/设置 步骤集合 | +| OnFinishedCallback | `Func?` | - | 获得/设置 步骤全部完成时回调方法 | | StepIndex | `int` | - | 获得/设置 当前步骤索引 默认 0 | @@ -474,7 +474,7 @@ Step 组件类 - 添加步骤到组件中 - `void Insert(int index, StepOption option)` - 插入步骤到组件中 -- `Task Next()` - 移动到下一步方法 返回当前 StepIndex 值 - `int Prev()` - 移动到上一步方法 返回当前 StepIndex 值 @@ -499,7 +499,7 @@ Step 组件类 | ArrowIcon | `string?` | - | 获得/设置 菜单箭头图标 | | DropdownIcon | `string?` | - | 获得/设置 组件数据源 | | Item | `MenuItem?` | - | 获得/设置 组件数据源 | -| OnClick | `Func?` | - | 获得/设置 菜单项点击回调委托 | @@ -517,13 +517,13 @@ Tab component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| AdditionalAssemblies | `IEnumerable在向后移动标签页按钮前 | +| AdditionalAssemblies | `IEnumerable?` | - | 获得/设置 Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. | +| AfterNavigatorTemplate | `RenderFragment?` | - | 获得/设置 标签页后置模板 默认 null 在向后移动标签页按钮前 | | AllowDrag | `bool` | - | 获得/设置 是否允许拖放标题栏更改栏位顺序,默认为 false | -| BeforeContextMenuTemplate | `RenderFragment在向前移动标签页按钮前 | +| BeforeContextMenuTemplate | `RenderFragment?` | - | Gets or sets the template of before context menu. Default is null. | +| BeforeNavigatorTemplate | `RenderFragment?` | - | 获得/设置 标签页前置模板 默认 null 在向前移动标签页按钮前 | | Body | `RenderFragment?` | - | 获得/设置 TabItems 模板 | -| ButtonTemplate | `RenderFragment?` | - | 获得/设置 按钮模板 默认 null | | ChildContent | `RenderFragment?` | - | 获得/设置 TabItems 模板 | | ClickTabToNavigation | `bool` | - | 获得/设置 点击 TabItem 时是否自动导航 默认为 false 不导航 | | CloseAllTabsText | `string?` | - | 获得/设置 关闭所有 TabItem 菜单文本 | @@ -536,12 +536,12 @@ Tab component | ContextMenuCloseOtherIcon | `string?` | - | Gets or sets the icon of tab item context menu close other button. Default is null. | | ContextMenuFullScreenIcon | `string?` | - | Gets or sets the icon of tab item context menu full screen button. Default is null. | | ContextMenuRefreshIcon | `string?` | - | Gets or sets the icon of tab item context menu refresh button. Default is null. | -| ContextMenuTemplate | `RenderFragment?` | - | Gets or sets the template of context menu. Default is null. | | DefaultUrl | `string?` | - | 获得/设置 默认标签页 关闭所有标签页时自动打开此地址 默认 null 未设置 | | DropdownIcon | `string?` | - | 获得/设置 下拉菜单标签图标 | | EnableErrorLogger | `bool?` | - | 获得/设置 是否开启全局异常捕获 默认 null 读取配置文件 值 | | ErrorLoggerToastTitle | `string?` | - | 获得/设置 错误日志 弹窗标题 默认 null | -| ExcludeUrls | `IEnumerable?` | - | 获得/设置 排除地址支持通配符 | | FullscreenToolbarButtonIcon | `string?` | - | Gets or sets the full screen toolbar button icon string. Default is null. | | FullscreenToolbarTooltipText | `string?` | - | Gets or sets the full screen toolbar button tooltip string. Default is null. | | Height | `int` | - | 获得/设置 组件高度 默认值为 0 高度自动 | @@ -550,18 +550,18 @@ Tab component | IsLazyLoadTabItem | `bool` | - | 获得/设置 懒加载 TabItem, 首次不渲染 默认 false | | IsLoopSwitchTabItem | `bool` | true | Gets or sets whether auto reset tab item index. Default is true. | | IsOnlyRenderActiveTab | `bool` | - | 获得/设置 是否仅渲染 Active 标签 默认 false | -| Menus | `IEnumerable?` | - | 获得/设置 导航菜单集合 默认 null | | NextIcon | `string?` | - | 获得/设置 下一个标签图标 | | NextTabNavLinkTooltipText | `string?` | - | Gets or sets the next tab navigation link tooltip text. Default is null. | | NotAuthorized | `RenderFragment?` | - | 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效 | | NotFound | `RenderFragment?` | - | 获得/设置 NotFound 模板 默认 null NET6.0/7.0 有效 | | NotFoundTabText | `string?` | - | 获得/设置 NotFound 标签文本 默认 null NET6.0/7.0 有效 | -| OnBeforeShowContextMenu | `Func>?` | - | Gets or sets before popup context menu callback. Default is null. | +| OnClickTabItemAsync | `Func?` | - | 获得/设置 点击 TabItem 时回调方法 | +| OnCloseTabItemAsync | `Func>?` | - | 关闭标签页回调方法 | +| OnDragItemEndAsync | `Func?` | - | 获得/设置 拖动标签页结束回调方法 | +| OnTabHeaderTextLocalizer | `Func?` | - | 获得/设置 Tab 标签头文本本地化回调方法 | +| OnToolbarRefreshCallback | `Func?` | - | Gets or sets the refresh toolbar button click event callback. Default is null. | | Placement | `Placement` | Placement.Top | 获得/设置 组件标签显示位置 默认显示在 Top 位置 | | PreviousIcon | `string?` | - | 获得/设置 上一个标签图标 | | PrevTabNavLinkTooltipText | `string?` | - | Gets or sets the previous tab navigation link tooltip text. Default is null. | @@ -579,7 +579,7 @@ Tab component | ShowToolbar | `bool` | - | Gets or sets whether show the toolbar. Default is false. | | TabHeader | `ITabHeader?` | - | Gets or sets the instance. Default is null. | | TabStyle | `TabStyle` | - | Gets or sets the tab style. Default is . | -| ToolbarTemplate | `RenderFragment?` | - | Gets or sets the template of the toolbar button. Default is null. | @@ -591,7 +591,7 @@ Tab component - 设置指定 TabItem 为激活状态 - `void AddTab(string url, string text, string? icon, bool active, bool closable)` - 通过 Url 添加 TabItem 标签方法 -- `void AddTab(Dictionary parameters, int? index)` - 添加 TabItem 方法 - `void ClickNextTab()` - 切换到下一个标签方法 @@ -635,7 +635,7 @@ Represents a link within a tab component. | ChildContent | `RenderFragment?` | - | Gets or sets the content of the component. Default is null | | Closable | `bool` | true | Gets or sets a value indicating whether the tab item is closable. Default is true. | | Icon | `string?` | - | Gets or sets the icon of the link. Default is null | -| OnClick | `Func?` | - | Gets or sets the callback method when the link is clicked. Default is null. | | Text | `string?` | - | Gets or sets the text of the link. Default is null | | Url | `string?` | - | Gets or sets the URL of the link. Default is null | @@ -657,8 +657,8 @@ Represents a link within a tab component. |-----------|------|---------|-------------| | ArrowIcon | `string?` | - | 获得/设置 菜单箭头图标 | | DropdownIcon | `string?` | - | 获得/设置 组件数据源 | -| Items | `IEnumerable?` | - | 获得/设置 菜单数据集合 | +| OnClick | `Func?` | - | 获得/设置 菜单项点击回调委托 | @@ -668,4 +668,4 @@ Represents a link within a tab component. --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt index 3aca761ca3c..847269f5d01 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt @@ -179,7 +179,7 @@ Alert 警告框组件 | ChildContent | `RenderFragment?` | - | 子组件 | | Color | `Color` | Color.Primary | 获得/设置 颜色 | | Icon | `string?` | - | 获得/设置 显示图标 | -| OnDismiss | `Func?` | - | 关闭警告框回调方法 | | ShowBar | `bool` | - | 获得/设置 是否显示左侧 Bar | | ShowDismiss | `bool` | - | 获得/设置 是否显示关闭按钮 | @@ -209,12 +209,12 @@ AutoFill component | IsAutoClearWhenInvalid | `bool` | - | 获得/设置 输入框内容无效时是否自动清空内容 默认 false | | IsLikeMatch | `bool` | - | Gets or sets whether to enable fuzzy search. Default is false. | | IsVirtualize | `bool` | - | Gets or sets whether virtual scrolling is enabled. Default is false. | -| Items | `IEnumerable?` | - | Gets or sets the collection of items for the component. | | LoadingIcon | `string?` | - | Gets or sets the loading icon. | -| OnClearAsync | `Func?` | - | Gets or sets the callback method when the clear button is clicked. Default is null. | +| OnCustomFilter | `Func>>?` | - | Gets or sets the custom collection filtering rules. | +| OnGetDisplayText | `Func?` | - | Gets or sets the method to get the display text from the model. Default is to use the ToString override method. | +| OnQueryAsync | `Func>>?` | - | Gets or sets the callback method for loading virtualized items. | | OverscanCount | `int` | 3 | Gets or sets the overscan count for virtual scrolling. Default is 3. | | RowHeight | `float` | 50f | Gets or sets the row height for virtual scrolling. Default is 50f. | | ShowDropdownListOnFocus | `bool` | true | Gets or sets whether to expand the dropdown candidate menu when focused. Default is true. | @@ -246,7 +246,7 @@ Avatar 头像框组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| GetUrlAsync | `Func>?` | - | 获得/设置 获取图片地址异步回调方法 | | Icon | `string?` | - | 获得/设置 头像框显示图标 | | IsBorder | `bool` | - | 获得/设置 是否显示 Border 默认为 false | | IsCircle | `bool` | - | 获得/设置 是否为圆形 | @@ -278,9 +278,9 @@ Avatar 头像框组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | AddIcon | `string?` | - | 获得/设置 新建图标 | -| AllowExtensions | `List?` | - | 获得/设置 图标文件扩展名集合 ".png" | | BorderRadius | `string?` | - | Gets or sets the border radius. Default is null. | -| CanPreviewCallback | `Func?` | - | 获得/设置 是否允许预览回调方法 默认 null | | DeleteIcon | `string?` | - | 获得/设置 删除图标 | | Height | `int` | 100 | 获得/设置 文件预览框高度 | | InvalidStatusIcon | `string?` | - | 获得/设置 状态正常图标 | @@ -332,7 +332,7 @@ BoolFilter component is used for boolean value filtering in table column. | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | @@ -374,7 +374,7 @@ BootstrapBlazorRoot 组件 |-----------|------|---------|-------------| | ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | | EnableErrorLogger | `bool?` | - | 获得/设置 是否开启全局异常捕获 默认 null 读取配置文件 EnableErrorLogger 值 | -| OnErrorHandleAsync | `Func?` | - | 获得/设置 自定义错误处理回调方法 | | ShowToast | `bool?` | - | 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 | | ToastTitle | `string?` | - | 获得/设置 Error Toast 弹窗标题 | @@ -396,7 +396,7 @@ Bootstrap Blazor 组件基类 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| AdditionalAttributes | `IDictionary?` | - | 获得/设置 用户自定义属性 | @@ -453,16 +453,16 @@ BootstrapLabelSetting 组件类 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment 有效 | -| CellTemplate | `RenderFragment?` | - | 获得/设置 Body 模板仅 有效 | +| CellTemplate | `RenderFragment?` | - | 获得/设置 单元格模板 | | ChildContent | `RenderFragment?` | - | 获得/设置 周内容 时有效 | | FirstDayOfWeek | `DayOfWeek` | DayOfWeek.Sunday | 获得/设置 星期第一天 默认 | | HeaderTemplate | `RenderFragment?` | - | 获得/设置 列头模板 | -| OnValueChanged | `Func?` | - | 获得/设置 值改变时回调委托 | | ShowYearButtons | `bool` | true | 获得/设置 是否显示年按钮 | | Value | `DateTime` | - | 获得/设置 组件值 | | ViewMode | `CalendarViewMode` | - | 获得/设置 是否显示周视图 默认为 月视图 | -| ValueChanged | `EventCallback` | - | 获得/设置 值改变时回调委托 | @@ -470,7 +470,7 @@ BootstrapLabelSetting 组件类 | Event | Type | Description | |-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 值改变时回调委托 | ### Source @@ -490,10 +490,10 @@ Camera 组件 | AutoStart | `bool` | - | 获得/设置 是否自动开启摄像头 默认为 false | | CaptureJpeg | `bool` | - | 获得/设置 拍照格式为 Jpeg 默认为 false 使用 png 格式 | | DeviceId | `string?` | - | 获得/设置 当前设备 Id 默认 null | -| OnClose | `Func?` | - | 获得/设置 关闭摄像头回调方法 | +| OnError | `Func?` | - | 获得/设置 拍照出错回调方法 | +| OnInit | `Func, Task>?` | - | 获得/设置 初始化摄像头回调方法 | +| OnOpen | `Func?` | - | 获得/设置 打开摄像头回调方法 | | Quality | `float` | 0.9f | 获得/设置 图像质量 默认为 0.9 | | VideoHeight | `int?` | 240 | 获得/设置 摄像头视频高度 默认 240 | | VideoWidth | `int?` | 320 | 获得/设置 摄像头视频宽度 默认 320 | @@ -502,7 +502,7 @@ Camera 组件 ### Public Methods -- `Task Capture()` - 拍照方法 - `Task Close()` - 关闭摄像头 @@ -518,7 +518,7 @@ Camera 组件 - `Task TriggerError(string err)` - 扫描发生错误回调方法 - *[JSInvokable]* -- `Task TriggerInit(List devices)` - 初始化设备方法 - *[JSInvokable]* - `Task TriggerOpen()` @@ -544,7 +544,7 @@ Captcha 组件 | BarText | `string?` | - | 获得/设置 Bar 显示文本 | | Diameter | `int` | 9 | 获得/设置 拼图直径 | | FailedText | `string?` | - | 获得/设置 Bar 显示文本 | -| GetImageName | `Func?` | - | 获得/设置 获取背景图方法委托 | | HeaderText | `string?` | - | 获得/设置 Header 显示文本 | | Height | `int` | 155 | 获得/设置 图片高度 | | ImagesName | `string` | "Pic.jpg" | 获得/设置 图床路径 默认值为 Pic.jpg | @@ -552,7 +552,7 @@ Captcha 组件 | LoadText | `string?` | - | 获得/设置 Bar 显示文本 | | Max | `int` | 1024 | 获得/设置 随机图片最大张数 默认 1024 | | Offset | `int` | 5 | 获得/设置 容错偏差 | -| OnValidAsync | `Func?` | - | 获得/设置 验证码结果回调委托 | | RefreshIcon | `string?` | - | 获得/设置 刷新按钮图标 默认值 fa-solid fa-arrows-rotate | | SideLength | `int` | 42 | 获得/设置 拼图边长 | | Width | `int` | 280 | 获得/设置 图片宽度 | @@ -563,7 +563,7 @@ Captcha 组件 - `Task Reset()` - 重置组件方法 -- `Task Verify(int offset, List trails)` - 验证方差方法 - *[JSInvokable]* @@ -585,11 +585,11 @@ Carousel 组件 | ChildContent | `RenderFragment?` | - | 获得/设置 子组件 要求使用 | | DisableTouchSwiping | `bool` | - | 获得/设置 是否禁用移动端手势滑动 默认 false | | HoverPause | `bool` | true | 获得/设置 鼠标悬停时是否暂停播放 默认 true | -| Images | `IEnumerable` | [] | 获得 Images 集合 | | IsFade | `bool` | - | 获得/设置 是否采用淡入淡出效果 默认为 false | | NextIcon | `string?` | - | 获得/设置 下一页图标 | -| OnClick | `Func?` | - | 获得/设置 点击 Image 回调委托 | +| OnSlideChanged | `Func?` | - | 获得/设置 幻灯片切换后回调方法 | | PlayMode | `CarouselPlayMode` | - | 获得/设置 自动播放方式 默认 | | PreviousIcon | `string?` | - | 获得/设置 上一页图标 | | ShowControls | `bool` | true | 获得/设置 是否显示控制按钮 默认 true | @@ -627,13 +627,13 @@ Checkbox 组件 |-----------|------|---------|-------------| | ChildContent | `RenderFragment?` | - | 获得/设置 子组件 RenderFragment 实例 | | Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | -| OnBeforeStateChanged | `Func>?` | - | 获得/设置 选中状态改变前回调此方法 返回 false 可以阻止状态改变 | +| OnStateChanged | `Func?` | - | 获得/设置 选择框状态改变时回调此方法 | | ShowAfterLabel | `bool` | - | 获得/设置 是否显示 Checkbox 后置 label 文字 默认为 false | | Size | `Size` | - | 获得/设置 Size 大小 默认为 None | | State | `CheckboxState` | - | 获得/设置 选择框状态 | | StopPropagation | `bool` | - | 获得/设置 是否事件冒泡 默认为 false | -| StateChanged | `EventCallback` | - | 获得/设置 State 状态改变回调方法 | @@ -641,7 +641,7 @@ Checkbox 组件 | Event | Type | Description | |-------|------|-------------| -| StateChanged | `EventCallback` | 获得/设置 State 状态改变回调方法 | ### Public Methods @@ -678,11 +678,11 @@ CheckboxList 组件基类 | Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | | IsButton | `bool` | - | 获得/设置 是否为按钮样式 默认 false | | IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | -| Items | `IEnumerable?` | - | 获得/设置 数据源 | +| ItemTemplate | `RenderFragment?` | - | 获得/设置 项模板 | | MaxSelectedCount | `int` | - | 获得/设置 最多选中数量 | -| OnMaxSelectedCountExceed | `Func?` | - | 获得/设置 超过最大选中数量时回调委托 | +| OnSelectedChanged | `Func, TValue, Task>?` | - | 获得/设置 SelectedItemChanged 方法 | | ShowBorder | `bool` | true | 获得/设置 非按钮模式下是否显示组件边框 默认为 true | | ShowButtonBorderColor | `bool` | - | 获得/设置 是否显示按钮边框颜色 默认为 false | @@ -714,12 +714,12 @@ CheckboxList 组件基类 | CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 | | IsButton | `bool` | - | 获得/设置 是否为按钮样式 默认 false | | IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | -| Items | `IEnumerable>?` | - | 获得/设置 数据源 | +| ItemTemplate | `RenderFragment>?` | - | 获得/设置 项模板 | | MaxSelectedCount | `int` | - | 获得/设置 最多选中数量 | -| ModelEqualityComparer | `Func提供此回调方法时忽略 属性 | -| OnMaxSelectedCountExceed | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | +| OnMaxSelectedCountExceed | `Func?` | - | 获得/设置 超过最大选中数量时回调委托 | +| OnSelectedChanged | `Func>, List, Task>?` | - | 获得/设置 SelectedItemChanged 方法 | | ShowBorder | `bool` | true | 获得/设置 是否显示边框 默认为 true | @@ -812,10 +812,10 @@ ColorPicker 颜色拾取器组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Formatter | `Func>?` | - | 获得/设置 显示颜色值格式化回调方法 | | IsSupportOpacity | `bool` | - | 获得/设置 是否支持透明度 默认 false 不支持 | -| Swatches | `List 开启时生效 默认 null | -| Template | `RenderFragment?` | - | 获得/设置 预设候选颜色 开启时生效 默认 null | +| Template | `RenderFragment?` | - | 获得/设置 显示模板 | @@ -850,11 +850,11 @@ ColorPicker 颜色拾取器组件 | Height | `int` | - | 获得/设置 组件高度 默认为 126px; | | IsAutoScroll | `bool` | true | 获得/设置 是否自动滚屏 默认 true | | IsFlashLight | `bool` | true | 获得/设置 指示灯 是否闪烁 默认 true 闪烁 | -| Items | `IEnumerable?` | - | 获得/设置 组件绑定数据源 | +| ItemTemplate | `RenderFragment?` | - | 获得/设置 Item 模板 | | LightColor | `Color` | Color.Success | 获得/设置 指示灯颜色 | | LightTitle | `string?` | - | 获得/设置 指示灯 Title 显示文字 | -| OnClear | `Func?` | - | 获得/设置 清空委托方法 | | ShowAutoScroll | `bool` | - | 获得/设置 是否显示自动滚屏选项 默认 false | | ShowLight | `bool` | true | 获得/设置 是否显示指示灯 默认 true 显示 | @@ -908,7 +908,7 @@ CountUp 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| OnCompleted | `Func?` | - | 获得/设置 计数结束回调方法 默认 null | | Option | `CountUpOption?` | - | 获得/设置 计数配置项 默认 null | | Value | `TValue?` | - | 获得/设置 Value 值 | @@ -942,8 +942,8 @@ CountUp 组件 | DateFormat | `string?` | - | 获得/设置 日期格式字符串 默认为 null | | DatePlaceHolder | `string?` | - | 获得/设置 日期 PlaceHolder 字符串 | | DateTimeFormat | `string?` | - | 获得/设置 日期时间格式字符串 默认为 null | -| DayDisabledTemplate | `RenderFragment?` | - | 获得/设置 禁用日单元格模板 | +| DayTemplate | `RenderFragment?` | - | 获得/设置 日单元格模板 | | EnableDisabledDaysCache | `bool` | true | 获得/设置 是否启用获得自定义禁用日期缓存 | | FirstDayOfWeek | `DayOfWeek` | DayOfWeek.Sunday | 获得/设置 星期第一天 默认 | | MaxValue | `DateTime?` | - | 获得/设置 当前日期最大值 | @@ -951,10 +951,10 @@ CountUp 组件 | NextMonthIcon | `string?` | - | 获得/设置 上一年图标 | | NextYearIcon | `string?` | - | 获得/设置 上一年图标 | | NowButtonText | `string?` | - | 获得/设置 此刻按钮文字 | -| OnClear | `Func 参数关闭 | +| OnClear | `Func?` | - | 获得/设置 清空按钮回调委托 | +| OnConfirm | `Func?` | - | 获得/设置 确认按钮回调委托 | +| OnDateChanged | `Func?` | - | 获得/设置 年月改变时回调方法 | +| OnGetDisabledDaysCallback | `Func>>?` | - | 获取/设置 获得月自定义禁用日期回调方法,默认 null 内部默认启用数据缓存 可通过 参数关闭 | | PickTimeMode | `PickTimeMode` | PickTimeMode.Dropdown | 获得/设置 选择时间方式 默认使用 | | PreviousMonthIcon | `string?` | - | 获得/设置 上一年图标 | | PreviousYearIcon | `string?` | - | 获得/设置 上一年图标 | @@ -967,12 +967,12 @@ CountUp 组件 | ShowRightButtons | `bool` | true | 获得/设置 是否显示右侧控制按钮 默认显示 | | ShowSidebar | `bool` | - | 获得/设置 是否显示快捷侧边栏 默认 false 不显示 | | ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | -| SidebarTemplate | `RenderFragment>?` | - | 获得/设置 侧边栏模板 默认 null | | TimeFormat | `string?` | - | 获得/设置 时间格式字符串 默认为 null | | TimePlaceHolder | `string?` | - | 获得/设置 时间 PlaceHolder 字符串 | | Value | `DateTime` | - | 获得/设置 组件值 | | ViewMode | `DatePickerViewMode` | DatePickerViewMode.Date | 获得/设置 组件显示模式 默认为显示年月日模式 | -| ValueChanged | `EventCallback` | - | 获得/设置 组件值改变时回调委托供双向绑定使用 | @@ -980,7 +980,7 @@ CountUp 组件 | Event | Type | Description | |-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 组件值改变时回调委托供双向绑定使用 | ### Public Methods @@ -1003,12 +1003,12 @@ DateTimePickerCell 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| OnClick | `Func?` | - | 获得/设置 按钮点击回调方法 默认 null | | ShowFestivals | `bool` | - | 获得/设置 是否节日 默认 false | | ShowHolidays | `bool` | - | 获得/设置 是否显示休假日 默认 false | | ShowLunar | `bool` | - | 获得/设置 是否显示中国阴历历法 默认 false | | ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | -| Template | `RenderFragment?` | - | 获得/设置 单元格模板 默认 null | | Text | `string?` | - | 获得/设置 日期 | | Value | `DateTime` | - | 获得/设置 日期 | @@ -1028,7 +1028,7 @@ DataTime filter component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | @@ -1059,8 +1059,8 @@ DateTimePicker 组件 | DatePlaceHolderText | `string?` | - | 获得/设置 日期占位符文本 默认 null 读取资源文件 | | DateTimeFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd HH:mm:ss" | | DateTimePlaceHolderText | `string?` | - | 获得/设置 日期时间占位符文本 默认 null 读取资源文件 | -| DayDisabledTemplate | `RenderFragment?` | - | 获得/设置 禁用日单元格模板 | +| DayTemplate | `RenderFragment?` | - | 获得/设置 日单元格模板 | | DisplayDisabledDayAsEmpty | `bool` | - | 获得/设置 是否将禁用日期显示为空字符串 默认 false 开启后组件会频繁调用 方法,建议外部使用缓存提高性能 | | DisplayMinValueAsEmpty | `bool` | true | 获得/设置 是否将 显示为空字符串 默认 true | | EnableDisabledDaysCache | `bool` | true | 获得/设置 是否启用获得年自定义禁用日期缓存 | @@ -1070,8 +1070,8 @@ DateTimePicker 组件 | IsEditable | `bool` | - | 获得/设置 是否可以编辑内容 默认 false | | MaxValue | `DateTime?` | - | 获得/设置 当前日期最大值 | | MinValue | `DateTime?` | - | 获得/设置 当前日期最小值 | -| OnBlurAsync | `Func 参数关闭 | +| OnBlurAsync | `Func?` | - | 获得/设置 失去焦点回调方法 默认 null | +| OnGetDisabledDaysCallback | `Func>>?` | - | 获取/设置 获得自定义禁用日期回调方法,默认 null 内部默认启用数据缓存 可通过 参数关闭 | | PickerButtonText | `string?` | - | 获得/设置 选择按钮文本 默认 null 读取资源文件 | | PickTimeMode | `PickTimeMode` | PickTimeMode.Dropdown | 获得/设置 选择时间方式 默认使用 | | ShowFestivals | `bool` | - | 获得/设置 是否显示节日 默认 false | @@ -1080,7 +1080,7 @@ DateTimePicker 组件 | ShowLunar | `bool` | - | 获得/设置 是否显示中国阴历历法 默认 false | | ShowSidebar | `bool` | - | 获得/设置 是否显示快捷侧边栏 默认不显示 | | ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | -| SidebarTemplate | `RenderFragment>?` | - | 获得/设置 侧边栏模板 默认 null | | TimeFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "HH:mm:ss" | | ViewMode | `DatePickerViewMode` | DatePickerViewMode.Date | 获得/设置 组件显示模式 默认为显示年月日模式 | @@ -1120,9 +1120,9 @@ DateTimeRange 时间范围组件 | IsEditable | `bool` | - | 获得/设置 是否可以编辑内容 默认 false | | MaxValue | `DateTime` | DateTime.MaxValue | 获得/设置 最大值 | | MinValue | `DateTime` | DateTime.MinValue | 获得/设置 最小值 | -| OnClearValue | `Func?` | - | 点击清空按钮回调委托方法 | +| OnConfirm | `Func?` | - | 点击确认按钮回调委托方法 | +| OnDateClick | `Func?` | - | Gets or sets the date value changed event callback. | | RenderMode | `DateTimeRangeRenderMode` | DateTimeRangeRenderMode.Double | 获得/设置 组件显示模式 默认为显示年月日模式 | | ShowClearButton | `bool` | true | 获得/设置 是否显示清空按钮 默认 true | | ShowFestivals | `bool` | - | 获得/设置 是否显示节日 默认 false | @@ -1132,7 +1132,7 @@ DateTimeRange 时间范围组件 | ShowSidebar | `bool` | - | 获得/设置 是否显示快捷侧边栏 默认不显示 | | ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | | ShowToday | `bool` | - | 获得/设置 是否显示今天按钮 默认为 false | -| SidebarItems | `List?` | - | 获得/设置 侧边栏快捷选项集合 | | TimeFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "HH:mm:ss" | | TodayButtonText | `string?` | - | 获得/设置 今天按钮文字 | | ViewMode | `DatePickerViewMode` | DatePickerViewMode.Date | 获得/设置 组件显示模式 默认为显示年月日模式 | @@ -1167,14 +1167,14 @@ Display 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | FormatString | `string?` | - | 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd | -| FormatterAsync | `Func | +| FormatterAsync | `Func>?` | - | 获得/设置 异步格式化字符串 | +| Lookup | `IEnumerable?` | - | | | LookupService | `ILookupService?` | - | | | LookupServiceData | `object?` | - | | | LookupServiceKey | `string?` | - | | | LookupStringComparison | `stringComparison` | StringComparison.OrdinalIgnoreCase | | | ShowTooltip | `bool` | - | 获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示 | -| TypeResolver | `Func?` | - | 获得/设置 类型解析回调方法 组件泛型为 Array 时内部调用 | @@ -1203,8 +1203,8 @@ Display 组件 | ShowLabel | `bool?` | - | 获得/设置 是否显示前置标签 默认值为 null 为空时默认不显示标签 | | ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示 Tooltip 多用于文字过长导致裁减时使用 默认 null | | Value | `TValue?` | - | Gets or sets the value of the input. This should be used with two-way binding. | -| ValueExpression | `Expression>?` | - | Gets or sets an expression that identifies the bound value. | +| ValueChanged | `EventCallback` | - | Gets or sets a callback that updates the bound value. | @@ -1212,7 +1212,7 @@ Display 组件 | Event | Type | Description | |-------|------|-------------| -| ValueChanged | `EventCallback` | Gets or sets a callback that updates the bound value. | ### Source @@ -1257,7 +1257,7 @@ DropUpload 组件 | IconTemplate | `RenderFragment?` | - | 获得/设置 图标模板 默认 null | | InvalidStatusIcon | `string?` | - | 获得/设置 上传失败状态图标 | | LoadingIcon | `string?` | - | 获得/设置 加载中图标 | -| OnGetFileFormat | `Func?` | - | 获得/设置 设置文件格式图标回调委托 | | ShowFooter | `bool` | - | 获得/设置 是否显示 Footer 默认 false 不显示 | | ShowUploadFileList | `bool` | true | 获得/设置 是否显示上传列表 默认 true | | TextTemplate | `RenderFragment?` | - | 获得/设置 文字模板 默认 null | @@ -1287,17 +1287,17 @@ DropUpload 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Accepts | `Func?` | - | 获得/设置 是否允许拖拽释放 | +| AllowsDrag | `Func?` | - | 获得/设置 当前节点是否允许被拖拽 | +| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | +| CopyItem | `Func?` | - | 获得/设置 复制内容 | +| Items | `List?` | - | 获取/设置 拖拽列表 | +| ItemWrapperClass | `Func?` | - | 获得/设置 每个 Item 的特殊 class | | MaxItems | `int?` | - | 获取/设置 最大数量 默认 null 不限制 | -| OnItemDrop | `EventCallback` | - | 获得/设置 返回放下的 Item | +| OnItemDropRejected | `EventCallback` | - | 获得/设置 当拖拽被禁止时调用 | +| OnItemDropRejectedByMaxItemLimit | `EventCallback` | - | 获得/设置 当拖拽因为数量超限被禁止时调用 | +| OnReplacedItemDrop | `EventCallback` | - | 获得/设置 返回被替换的 Item | @@ -1305,10 +1305,10 @@ DropUpload 组件 | Event | Type | Description | |-------|------|-------------| -| OnItemDrop | `EventCallback` | 获得/设置 返回放下的 Item | +| OnItemDropRejected | `EventCallback` | 获得/设置 当拖拽被禁止时调用 | +| OnItemDropRejectedByMaxItemLimit | `EventCallback` | 获得/设置 当拖拽因为数量超限被禁止时调用 | +| OnReplacedItemDrop | `EventCallback` | 获得/设置 返回被替换的 Item | ### Public Methods @@ -1348,7 +1348,7 @@ Enum filter component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | | Type | `Type?` | - | 获得/设置 相关枚举类型 | @@ -1398,8 +1398,8 @@ FileListUploadBase 基类 | CancelIcon | `string?` | - | 获得/设置 取消图标 | | DeleteIcon | `string?` | - | 获得/设置 删除按钮图标 | | DownloadIcon | `string?` | - | 获得/设置 下载按钮图标 | -| OnCancel | `Func?` | - | 获得/设置 点击取消按钮回调此方法 默认 null | +| OnDownload | `Func?` | - | 获得/设置 点击下载按钮回调方法 默认 null | | ShowDeleteButton | `bool` | - | 获得/设置 是否显示删除按钮 默认 false | | ShowDownloadButton | `bool` | - | 获得/设置 是否显示下载按钮 默认 false | @@ -1451,7 +1451,7 @@ FilterLogicItem 组件用于选择过滤条件的逻辑运算符 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Logic | `FilterLogic` | - | 获得/设置 逻辑运算符 | -| LogicChanged | `EventCallback` | - | 获得/设置 逻辑运算符改变回调方法 | @@ -1459,7 +1459,7 @@ FilterLogicItem 组件用于选择过滤条件的逻辑运算符 | Event | Type | Description | |-------|------|-------------| -| LogicChanged | `EventCallback` | 获得/设置 逻辑运算符改变回调方法 | ### Source @@ -1510,7 +1510,7 @@ FlipClock 组件 | CardWidth | `string?` | - | 获得/设置 组件卡片宽度 默认 null 未设置使用样式默认值 60px; | | FontSize | `string?` | - | 获得/设置 组件字体大小 默认 null 未设置使用样式默认值 80px; | | Height | `string?` | - | 获得/设置 组件高度 默认 null 未设置使用样式默认值 200px; | -| OnCompletedAsync | `Func?` | - | 获得/设置 计时结束回调方法 默认 null | | ShowDay | `bool` | - | 获得/设置 是否显示 Day 默认 false | | ShowHour | `bool` | true | 获得/设置 是否显示 Hour 默认 true | | ShowMinute | `bool` | true | 获得/设置 是否显示 Minute 默认 true | @@ -1591,7 +1591,7 @@ Handwritten 手写签名 | ClearButtonText | `string?` | - | 清除按钮文本 | | Result | `string?` | - | 手写签名imgBase64字符串 | | SaveButtonText | `string?` | - | 保存按钮文本 | -| HandwrittenBase64 | `EventCallback` | - | 手写结果回调方法 | @@ -1599,7 +1599,7 @@ Handwritten 手写签名 | Event | Type | Description | |-------|------|-------------| -| HandwrittenBase64 | `EventCallback` | 手写结果回调方法 | ### Public Methods @@ -1643,8 +1643,8 @@ Frame component encapsulates the Html iframe element | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Data | `object?` | - | Gets or sets the data to be passed | -| OnPostDataAsync | `Func?` | - | Gets or sets Frame loads the data passed by the page | +| OnReadyAsync | `Func?` | - | Gets or sets Callback method after the page is loaded. | | Src | `string?` | - | Gets or sets the URL of the webpage to be loaded in the Frame | @@ -1678,7 +1678,7 @@ Frame component encapsulates the Html iframe element | MinusIcon | `string?` | - | 获得/设置 缩小 Icon 图标 | | NextIcon | `string?` | - | 获得/设置 下一张图片 Icon 图标 | | PlusIcon | `string?` | - | 获得/设置 方法 Icon 图标 | -| PreviewList | `List?` | - | 获得/设置 预览大图链接集合 默认 null | | PreviousIcon | `string?` | - | 获得/设置 上一张图片 Icon 图标 | | RotateLeftIcon | `string?` | - | 获得/设置 向左旋转 Icon 图标 | | RotateRightIcon | `string?` | - | 获得/设置 向右旋转 Icon 图标 | @@ -1714,11 +1714,11 @@ Image 组件 | HandleError | `bool` | - | 获得/设置 加载失败时是否显示错误占位符 默认 false | | IsAsync | `bool` | - | 获得/设置 图片是否异步加载 | | IsIntersectionObserver | `bool` | - | 获得/设置 是否交叉监听 默认 false | -| OnErrorAsync | `Func?` | - | 获得/设置 图片加载失败时回调方法 | +| OnLoadAsync | `Func?` | - | 获得/设置 图片加载成功时回调方法 | | PlaceHolderTemplate | `RenderFragment?` | - | 获得/设置 占位模板 未设置 或者 正在加载时显示 默认 null 未设置 | | PreviewIndex | `int` | 0 | 获得/设置 预览大图当前链接集合点开的索引 默认为 0 | -| PreviewList | `List?` | - | 获得/设置 预览大图链接集合 默认 null | | ShowPlaceHolder | `bool` | - | 获得/设置 是否显示占位符 适用于大图片加载 默认 false | | ZIndex | `int` | 2050 | 获得/设置 原生 z-index 属性 默认 2050 | | ZoomSpeed | `double?` | - | 获得/设置 预览缩放速度 默认 null 未设置取 0.015 值 | @@ -1743,7 +1743,7 @@ Image 组件 | AutoUnobserveWhenIntersection | `bool` | true | 获得/设置 可见后是否自动取消观察 默认 true 可见后自动取消观察提高性能 | | AutoUnobserveWhenNotIntersection | `bool` | - | 获得/设置 不可见后是否自动取消观察 默认 false 不可见后自动取消观察提高性能 | | ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| OnIntersecting | `Func?` | - | 获得/设置 已经交叉回调方法 | | RootMargin | `string?` | - | Margin around the root. Can have values similar to the CSS margin property, e.g. "10px 20px 30px 40px" (top, right, bottom, left). The values can be percentages. This set of values serves to grow or shrink each side of the root element's bounding box before computing intersections. Defaults to all zeros. | | Threshold | `string?` | - | Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed. If you only want to detect when visibility passes the 50% mark, you can use a value of 0.5. If you want the callback to run every time visibility passes another 25%, you would specify the array [0, 0.25, 0.5, 0.75, 1]. The default is 0 (meaning as soon as even one pixel is visible, the callback will be run). A value of 1.0 means that the threshold isn't considered passed until every pixel is visible. | | UseElementViewport | `bool` | true | 获得/设置 是否使用元素视口作为根元素 默认为 true 使用当前元素作为根元素 The element that is used as the viewport for checking visibility of the target. Must be the ancestor of the target. Defaults to the browser viewport if value is false. Default value is true | @@ -1791,15 +1791,15 @@ Layout 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| AdditionalAssemblies | `IEnumerable?` | - | 获得/设置 Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. | | AllowDragTab | `bool` | true | 获得/设置 是否允许拖动标签页 默认 true | -| BeforeTabContextMenuTemplate | `RenderFragment?` | - | Gets or sets the template of before tab context menu. Default is null. | | ClickTabToNavigation | `bool` | true | 获得/设置 点击标签页是否切换地址栏 默认 true | | CollapseBarTemplate | `RenderFragment?` | - | 获得/设置 收起展开按钮模板 | | EnableErrorLogger | `bool?` | - | 获得/设置 是否开启全局异常捕获 默认 null 读取配置文件 EnableErrorLogger 值 | | EnableErrorLoggerILogger | `bool?` | - | 获得/设置 是否启用日志记录功能 默认 null 启用 使用 设置值 | | ErrorLoggerToastTitle | `string?` | - | 获得/设置 错误日志 弹窗标题 默认 null | -| ExcludeUrls | `IEnumerable?` | - | 获得/设置 排除地址支持通配符 | | Footer | `RenderFragment?` | - | 获得/设置 Footer 模板 | | FullscreenToolbarButtonIcon | `string?` | - | Gets or sets the full screen toolbar button icon string. Default is null. | | FullscreenToolbarTooltipText | `string?` | - | Gets or sets the full screen toolbar button tooltip string. Default is null. | @@ -1814,20 +1814,20 @@ Layout 组件 | IsPage | `bool` | - | 获得/设置 是否为整页面布局 默认为 false | | Main | `RenderFragment?` | - | 获得/设置 Main 模板 | | MenuBarIcon | `string?` | - | 获得/设置 MenuBar 图标 | -| Menus | `IEnumerable?` | - | 获得/设置 侧边栏菜单集合 | | NotAuthorized | `RenderFragment?` | - | 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效 | | NotAuthorizeUrl | `string` | "/Account/Login" | 获得/设置 未授权导航地址 默认为 "/Account/Login" Cookie 模式登录页 | | NotFound | `RenderFragment?` | - | 获得/设置 NotFound 模板 默认 null NET6.0/7.0 有效 | | NotFoundTabText | `string?` | - | 获得/设置 NotFound 标签文本 默认 null NET6.0/7.0 有效 | -| OnAuthorizing | `Func>?` | - | 获得/设置 授权回调方法多用于权限控制 | +| OnBeforeShowContextMenu | `Func>?` | - | Gets or sets before popup context menu callback. Default is null. | +| OnClickMenu | `Func?` | - | 获得/设置 点击菜单时回调委托方法 默认为 null | +| OnCloseTabItemAsync | `Func>?` | - | 获得/设置 关闭标签页前回调方法 | +| OnCollapsed | `Func?` | - | 获得/设置 收缩展开回调委托 | +| OnErrorHandleAsync | `Func?` | - | 获得/设置 自定义错误处理回调方法 | +| OnTabHeaderTextLocalizer | `Func?` | - | 获得/设置 Tab 标签头文本本地化回调方法 | +| OnToolbarRefreshCallback | `Func?` | - | Gets or sets the refresh toolbar button click event callback. Default is null. | +| OnUpdateAsync | `Func?` | - | 获得/设置 更新回调方法 默认 null | | RefreshToolbarButtonIcon | `string?` | - | Gets or sets the refresh toolbar button icon string. Default is null. | | RefreshToolbarTooltipText | `string?` | - | Gets or sets the refresh toolbar button tooltip string. Default is null. | | Resource | `object?` | - | 获得/设置 AuthorizeRouteView 参数 | @@ -1852,13 +1852,13 @@ Layout 组件 | TabContextMenuCloseIcon | `string?` | - | Gets or sets the icon of tab item context menu close button. Default is null. | | TabContextMenuCloseOtherIcon | `string?` | - | Gets or sets the icon of tab item context menu close other button. Default is null. | | TabContextMenuRefreshIcon | `string?` | - | Gets or sets the icon of tab item context menu refresh button. Default is null. | -| TabContextMenuTemplate | `RenderFragment?` | - | Gets or sets the template of tab context menu. Default is null. | | TabDefaultUrl | `string` | "" | 获得/设置 默认标签页 关闭所有标签页时自动打开此地址 默认 null 未设置 | | TabStyle | `TabStyle` | - | Gets or sets the tab style. Default is . | -| ToolbarTemplate | `RenderFragment?` | - | Gets or sets the template of the toolbar button. Default is null. | | TooltipText | `string?` | - | 获得/设置 鼠标悬停提示文字信息 | | UseTabSet | `bool` | - | 获得/设置 是否右侧使用 Tab 组件 默认为 false 不使用 | -| IsCollapsedChanged | `EventCallback` | - | 获得/设置 侧边栏状态 | @@ -1866,13 +1866,13 @@ Layout 组件 | Event | Type | Description | |-------|------|-------------| -| IsCollapsedChanged | `EventCallback` | 获得/设置 侧边栏状态 | ### Public Methods - `string GetId()` - -- `Task HandlerException(Exception ex, RenderFragment errorContent)` - - `void Render(RenderFragment renderFragment)` - @@ -1962,13 +1962,13 @@ ListGroup 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| GetItemDisplayText | `Func?` | - | 获得/设置 获得条目显示文本内容回调方法 | | HeaderTemplate | `RenderFragment?` | - | 获得/设置 Header 模板 默认 null | | HeaderText | `string?` | - | 获得/设置 Header 文字 默认 null | -| Items | `List?` | - | 获得/设置 数据源集合 | +| ItemTemplate | `RenderFragment?` | - | 获得/设置 Header 模板 默认 null | +| OnClickItem | `Func?` | - | 获得/设置 点击 List 项目回调方法 | +| OnDoubleClickItem | `Func?` | - | 获得/设置 双击 List 项目回调方法 | @@ -1993,25 +1993,25 @@ ListView 组件基类 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 BodyTemplate **[Required]** | +| CollapsedGroupCallback | `Func?` | - | 获得/设置 首次渲染是否收缩回调委托 | | Collapsible | `bool` | - | 获得/设置 是否可折叠 默认 false 需要开启分组设置 | | EmptyTemplate | `RenderFragment?` | - | 获得/设置 无数据时模板 默认 null 未设置 | | EmptyText | `string?` | - | 获得/设置 无数据时显示文字 默认 null 未设置使用资源文件设置文字 | | FooterTemplate | `RenderFragment?` | - | 获得/设置 FooterTemplate 默认 null 未设置 设置值后 参数不起作用,请自行实现分页功能 | -| GroupHeaderTextCallback | `Func 值 默认 null 使用分组 Key.ToString() 方法获取 | -| GroupItemOrderCallback | `Func?` | - | 获得/设置 获得 值 默认 null 使用分组 Key.ToString() 方法获取 | +| GroupItemOrderCallback | `Func, IOrderedEnumerable>?` | - | 获得/设置 组内项目排序回调方法 默认 null | +| GroupName | `Func?` | - | 获得/设置 分组 Lambda 表达式 默认 null | +| GroupOrderCallback | `Func>, IOrderedEnumerable>>?` | - | 获得/设置 组排序回调方法 默认 null 使用内置 | | HeaderTemplate | `RenderFragment?` | - | 获得/设置 CardHeard | | Height | `string?` | - | 获得/设置 组件高度 默认 null 未设置高度 如:50% 100px 10rem 10vh 等 | | IsAccordion | `bool` | - | 获得/设置 是否手风琴效果 默认 false 需要开启可收缩设置 | | IsPagination | `bool` | - | 获得/设置 是否分页 默认为 false 不分页 设置 时分页功能自动被禁用 | | IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | -| Items | `IEnumerable | -| OnListViewItemClick | `Func?` | - | 获得/设置 数据源 | +| OnCollapseChanged | `Func?` | - | 获得/设置 CollapseItem 展开收缩时回调方法 默认 false 需要开启可收缩设置 | +| OnListViewItemClick | `Func?` | - | 获得/设置 ListView组件元素点击时回调委托 | +| OnQueryAsync | `Func>>?` | - | 异步查询回调方法 | | PageItems | `int` | 20 | 获得/设置 每页数据数量 默认 20 | @@ -2040,7 +2040,7 @@ ListView 组件基类 | LoadingTemplate | `RenderFragment?` | - | 获得/设置 加载更多模板 默认 null | | NoMoreTemplate | `RenderFragment?` | - | 获得/设置 没有更多数据时显示的模板 默认为 null | | NoMoreText | `string?` | - | 获得/设置 没有更多数据提示信息 默认为 null 读取资源文件中的预设值 | -| OnLoadMoreAsync | `Func 为 true 时才触发此回调方法 | +| OnLoadMoreAsync | `Func?` | - | 获得/设置 触底回调方法 为 true 时才触发此回调方法 | | Threshold | `string` | "1" | 获得/设置 触底元素触发 阈值 默认为 1 | @@ -2130,9 +2130,9 @@ Marquee 字幕滚动组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | AlwaysTriggerGetItems | `bool` | - | 获得 是否每次弹窗时均调用 回调方法,多用于动态填装过滤条件 | -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | | LoadingTemplate | `RenderFragment?` | - | 获得/设置 Loading 模板 | -| OnGetItemsAsync | `Func>>?` | - | 获得 过滤项集合回调方法 适合动态给定数据源 | | SearchPlaceHolderText | `string?` | - | 获得/设置 搜索栏占位符 默认 nul 使用资源文件中值 | | SelectAllText | `string?` | - | 获得/设置 全选按钮文本 默认 nul 使用资源文件中值 | | ShowSearch | `bool` | true | 获得/设置 是否显示搜索栏 默认 true | @@ -2234,7 +2234,7 @@ NumberFilter component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | @@ -2258,7 +2258,7 @@ Pagination 组件 | MaxPageLinkCount | `int` | 5 | 获得/设置 Page up/down 页码数量 默认 5 | | NextEllipsisPageIcon | `string?` | - | 获得/设置 上一页图标 | | NextPageIcon | `string?` | - | 获得/设置 下一页图标 | -| OnPageLinkClick | `Func?` | - | 点击页码时回调方法 参数是当前页码 | | PageCount | `int` | - | 获得/设置 页码总数 | | PageIndex | `int` | 1 | 获得/设置 当前页码 | | PageInfoTemplate | `RenderFragment?` | - | 获得/设置 分页信息模板 默认 null | @@ -2287,7 +2287,7 @@ Pagination 组件 | Index | `int` | - | 获得/设置 当前页码 | | IsActive | `bool` | - | 获得/设置 是否激活 默认 false | | IsDisabled | `bool` | - | 获得/设置 是否禁用 默认 false | -| OnClick | `EventCallback` | - | 点击页码时回调方法 参数是当前页码 | @@ -2295,7 +2295,7 @@ Pagination 组件 | Event | Type | Description | |-------|------|-------------| -| OnClick | `EventCallback` | 点击页码时回调方法 参数是当前页码 | ### Source @@ -2343,10 +2343,10 @@ Popover 弹出窗组件 | Debounce | `int` | - | 获得/设置 防抖时间 默认为 0 即不开启 | | IsClearable | `bool` | - | Gets or sets whether the select component is clearable. Default is false. | | IsPopover | `bool` | - | | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 候选项模板 默认 null | | NoDataTip | `string?` | - | 获得/设置 无匹配数据时显示提示信息 默认提示"无匹配数据" | | Offset | `string?` | - | | -| OnSelectedItemChanged | `Func?` | - | 获得/设置 下拉菜单选择回调方法 默认 null | | Placement | `Placement` | Placement.Bottom | | | ScrollIntoViewBehavior | `ScrollIntoViewBehavior` | ScrollIntoViewBehavior.Smooth | 获得/设置 滚动行为 默认 | | ShowShadow | `bool` | true | | @@ -2407,16 +2407,16 @@ QueryBuilder 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Value | `FilterKeyValueAction?` | - | 获得/设置 过滤模型 实例值 **[Required]** | -| ChildContent | `RenderFragment?` | - | 获得/设置 模板 | | GroupText | `string?` | - | 获得/设置 组合过滤条件文本 | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 Header 模板 默认 null | | ItemText | `string?` | - | 获得/设置 过滤条件文本 | | Logic | `FilterLogic` | - | 获得/设置 逻辑运算符 | | MinusIcon | `string?` | - | 获得/设置 减少过滤条件图标 | | PlusIcon | `string?` | - | 获得/设置 增加过滤条件图标 | | RemoveIcon | `string?` | - | 获得/设置 移除过滤条件图标 | | ShowHeader | `bool` | true | 获得/设置 是否显示 Header 区域 默认 true 显示 | -| ValueChanged | `EventCallback` | - | 获得/设置 Filter 回调方法 支持双向绑定 | @@ -2424,7 +2424,7 @@ QueryBuilder 组件 | Event | Type | Description | |-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 Filter 回调方法 支持双向绑定 | ### Source @@ -2474,7 +2474,7 @@ Radio 单选框组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | GroupName | `string?` | - | 获得/设置 Radio 组名称一般来讲需要设置 默认为 null 未设置 **[Required]** | -| OnClick | `Func?` | - | 获得/设置 点击回调方法 | @@ -2528,11 +2528,11 @@ Radio 单选框组件 | IsAutoAddNullItem | `bool` | - | 获得/设置 值为可为空枚举类型时是否自动添加空值 默认 false 自定义空值显示文本请参考 | | IsButton | `bool` | - | 获得/设置 是否为按钮样式 默认 false | | IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | -| Items | `IEnumerable提供此回调方法时忽略 属性 | +| Items | `IEnumerable>?` | - | 获得/设置 数据源 | +| ItemTemplate | `RenderFragment>?` | - | 获得/设置 项模板 | +| ModelEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | | NullItemText | `string?` | - | 获得/设置 空值项显示文字 默认为 "" 是否自动添加空值请参考 | -| OnSelectedChanged | `Func?` | - | 获得/设置 SelectedItemChanged 方法 | | ShowBorder | `bool` | true | 获得/设置 是否显示边框 默认为 true | @@ -2559,14 +2559,14 @@ Rate 组件 | IsDisable | `bool` | - | 获得/设置 是否禁用 默认为 false | | IsReadonly | `bool` | - | 获得/设置 是否只读 默认为 false | | IsWrap | `bool` | - | 获得/设置 是否禁止换行 默认为 true | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 子项模板 | | Max | `int` | 5 | 获得/设置 最大值 默认 5 | -| OnValueChanged | `Func?` | - | 获得/设置 组件值变化时回调委托 | | ShowValue | `bool` | - | 获得/设置 是否显示 Value 默认为 false | | StarIcon | `string?` | - | 获得/设置 选中图标 | | UnStarIcon | `string?` | - | 获得/设置 未选中图标 | | Value | `double` | - | 获得/设置 组件值 | -| ValueChanged | `EventCallback` | - | 获得/设置 组件值变化时回调委托 | @@ -2574,7 +2574,7 @@ Rate 组件 | Event | Type | Description | |-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 组件值变化时回调委托 | ### Source @@ -2614,7 +2614,7 @@ RenderTemplate component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | ChildContent | `RenderFragment?` | - | Gets or sets the child component | -| OnRenderAsync | `Func?` | - | Gets or sets the callback delegate for the first load | @@ -2641,11 +2641,11 @@ Repeat 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| ContainerTemplate | `RenderFragment?` | - | 获得/设置 容器模板 | | EmptyTemplate | `RenderFragment?` | - | 获得/设置 正在加载模板 | | EmptyText | `string?` | - | 获得/设置 无数据时提示信息 默认 null | -| Items | `IEnumerable?` | - | 获得/设置 数据源 | +| ItemTemplate | `RenderFragment?` | - | 获得/设置 模板 | | LoadingTemplate | `RenderFragment?` | - | 获得/设置 正在加载模板 | | ShowEmpty | `bool` | true | 获得/设置 是否显示无数据信息 默认 true 显示 | | ShowLoading | `bool` | true | 获得/设置 是否显示正在加载信息 默认 true 显示 | @@ -2740,17 +2740,17 @@ Search component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| ButtonTemplate | `RenderFragment>?` | - | Gets or sets the button template. Default is null. | | ClearButtonColor | `Color` | Color.Primary | Gets or sets the color of clear button. Default is . | | ClearButtonIcon | `string?` | - | Gets or sets the icon of clear button. Default is null. | | ClearButtonText | `string?` | - | Gets or sets the text of clear button. Default is null. | -| IconTemplate | `RenderFragment>?` | - | Gets or sets the icon template. Default is null if not set. | | IsTriggerSearchByInput | `bool` | true | Gets or sets whether the search is triggered by input. Default is true. If false, the search button must be clicked to trigger. | -| OnGetDisplayText | `Func?` | - | Gets or sets the callback method to get display text. Default is null, using ToString() method. | +| OnSearch | `Func>>?` | - | Gets or sets the callback delegate when the search button is clicked. | +| PrefixButtonTemplate | `RenderFragment>?` | - | Gets or sets the prefix button template. Default is null. | | PrefixIcon | `string?` | - | Gets or sets the prefix icon. Default is null. | -| PrefixIconTemplate | `RenderFragment>?` | - | Gets or sets the prefix icon template. Default is null. | | SearchButtonColor | `Color` | Color.Primary | Gets or sets the search button color. Default is . | | SearchButtonIcon | `string?` | - | Gets or sets the search button icon. Default is null. | | SearchButtonLoadingIcon | `string?` | - | Gets or sets the loading icon for the search button. Default is null. | @@ -2788,13 +2788,13 @@ Segmented 组件 | ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 | | IsBlock | `bool` | - | 获得/设置 是否充满父元素 默认 false | | IsDisabled | `bool` | - | 获得/设置 是否禁用 默认 false | -| Items | `IEnumerable>?` | - | 获得/设置 选项集合 默认 null | +| ItemTemplate | `RenderFragment>?` | - | 获得/设置 候选项模板 默认 null | +| OnValueChanged | `Func?` | - | 获得/设置 选中值改变后回调委托方法 默认 null | | ShowTooltip | `bool` | - | 获得/设置 是否自动显示 Tooltip 默认 false | | Size | `Size` | - | 获得/设置 组件大小 默认值 | | Value | `TValue?` | - | 获得/设置 选中值 默认 null | -| ValueChanged | `EventCallback` | - | 获得/设置 选中值回调委托 默认 null | @@ -2802,7 +2802,7 @@ Segmented 组件 | Event | Type | Description | |-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 选中值回调委托 默认 null | ### Public Methods @@ -2900,7 +2900,7 @@ Range 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| OnTimeout | `Func?` | - | 获得/设置 倒计时结束时回调委托 | | Show | `bool` | - | 获得/设置 是否显示波形图 默认 false | | ShowUsedTime | `bool` | true | 获得/设置 是否显示已用时长 默认 true | | TotalTime | `int` | 60 * 1000 | 获得/设置 总时长 默认 60 000 毫秒 | @@ -2954,7 +2954,7 @@ Split 组件 | IsCollapsible | `bool` | - | 获取 是否开启折叠功能 默认 false | | IsKeepOriginalSize | `bool` | true | 获得/设置 开启 后,恢复时是否保持原始大小 默认 true | | IsVertical | `bool` | - | 获得/设置 是否垂直分割 | -| OnResizedAsync | `Func | +| OnResizedAsync | `Func?` | - | 获得/设置 窗格尺寸改变时回调方法 可参阅 | | SecondPaneMinimumSize | `string?` | - | 获得/设置 第一个窗格模板 | | SecondPaneTemplate | `RenderFragment?` | - | 获得/设置 第二个窗格模板 支持任意单位如 10px 20% 5em 1rem 未提供单位时默认为 px | | ShowBarHandle | `bool` | true | 获取 是否显示拖动条 默认 true | @@ -3013,7 +3013,7 @@ StringFilter component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | @@ -3059,8 +3059,8 @@ SvgIcon 组件 | Content | `string?` | - | 获得/设置 显示内容 | | FooterTemplate | `RenderFragment?` | - | 获得/设置 Footer 模板 | | IsConfirm | `bool` | - | 获得/设置 是否为确认弹窗模式 默认为 false | -| OnCloseAsync | `Func?` | - | 获得/设置 关闭按钮回调方法 | +| OnConfirmAsync | `Func?` | - | 获得/设置 确认按钮回调方法 | | ShowClose | `bool` | true | 获得/设置 是否显示关闭按钮 默认 true 显示 | | ShowFooter | `bool` | - | 获得/设置 是否显示 Footer 默认 false 不显示 | | Title | `string?` | - | 获得/设置 显示标题 | @@ -3111,10 +3111,10 @@ ThemeProvider 组件 | DarkModeText | `string?` | - | 获得/设置 暗黑模式文本 默认 null 未设置使用本地化资源 | | LightModeIcon | `string?` | - | 获得/设置 明亮模式图标 默认 null | | LightModeText | `string?` | - | 获得/设置 明亮模式文本 默认 null 未设置使用本地化资源 | -| OnThemeChangedAsync | `Func?` | - | 获得/设置 主题切换回调方法 | | ShowShadow | `bool` | true | 获得/设置 下拉框是否显示阴影效果 默认 true | | ThemeValue | `ThemeValue` | ThemeValue.UseLocalStorage | 主题类型 | -| ThemeValueChanged | `EventCallback` | - | 主题类型改变回调方法 | @@ -3122,7 +3122,7 @@ ThemeProvider 组件 | Event | Type | Description | |-------|------|-------------| -| ThemeValueChanged | `EventCallback` | 主题类型改变回调方法 | ### Public Methods @@ -3148,7 +3148,7 @@ ThemeProvider 组件 | IsAlternate | `bool` | - | 获得/设置 是否左右交替出现 默认 false | | IsLeft | `bool` | - | 获得/设置 内容是否出现在时间线左侧 默认为 false | | IsReverse | `bool` | - | 获得/设置 是否反转 | -| Items | `IEnumerable?` | - | 获得/设置 绑定数据集 | @@ -3170,8 +3170,8 @@ TimePicker 组件 | CancelButtonText | `string?` | - | 获得/设置 取消按钮显示文字 | | ConfirmButtonText | `string?` | - | 获得/设置 确定按钮显示文字 | | HasSeconds | `bool` | true | 获得/设置 是否显示秒 默认为 true | -| OnClose | `Func?` | - | 获得/设置 取消按钮回调委托 | +| OnConfirm | `Func?` | - | 获得/设置 确认按钮回调委托 | @@ -3194,7 +3194,7 @@ TimePicker 组件 | UpIcon | `string?` | - | 获得/设置 向上箭头图标 | | Value | `TimeSpan` | - | 获得/设置 组件值 | | ViewMode | `TimePickerCellViewMode` | - | 获得/设置 时间选择框视图模式 | -| ValueChanged | `EventCallback` | - | 获得/设置 组件值变化时委托方法 | @@ -3202,7 +3202,7 @@ TimePicker 组件 | Event | Type | Description | |-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 组件值变化时委托方法 | ### Public Methods @@ -3233,8 +3233,8 @@ Timer 组件 | CancelText | `string?` | - | 获得/设置 取消按钮文字 | | Icon | `string?` | - | 获得/设置 Alert 图标 | | IsVibrate | `bool` | true | 获得/设置 倒计时结束时设备震动 | -| OnCancel | `Func?` | - | 获得/设置 取消时回调委托 | +| OnTimeout | `Func?` | - | 获得/设置 倒计时结束时回调委托 | | PauseText | `string?` | - | 获得/设置 暂停按钮文字 | | ResumeText | `string?` | - | 获得/设置 继续按钮文字 | | StarText | `string?` | - | 获得/设置 取消按钮文字 | @@ -3346,7 +3346,7 @@ Tooltip 组件 | CustomClass | `string?` | - | | | Delay | `string?` | - | | | FallbackPlacements | `string[]?` | - | 获得/设置 位置 默认为 null | -| GetTitleCallback | `Func>?` | - | 获得/设置 获得显示内容异步回调方法 默认 null | | IsHtml | `bool` | - | | | Offset | `string?` | - | 获得/设置 偏移量 默认为 null | | Placement | `Placement` | Placement.Top | | @@ -3407,7 +3407,7 @@ Transition 动画组件 |-----------|------|---------|-------------| | ChildContent | `RenderFragment?` | - | 获得/设置 子内容 | | Duration | `int` | - | 获得/设置 动画执行时长 单位毫秒 默认为 0 未生效 | -| OnTransitionEnd | `Func?` | - | 获得/设置 动画执行完成回调委托 | | Show | `bool` | true | 获得/设置 是否显示动画 默认 true | | TransitionType | `TransitionType` | TransitionType.FadeIn | 获得/设置 动画名称 默认 FadeIn | @@ -3434,7 +3434,7 @@ TypedJs 组件类 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| OnCompleteAsync | `Func?` | - | 获得/设置 打字结束回调方法 默认 null | | Options | `TypedOptions?` | - | 获得/设置 组件配置 实例 默认 null | | Text | `string?` | - | 获得/设置 组件显示文字 默认 null 未设置 | @@ -3469,13 +3469,13 @@ Upload 组件基类 |-----------|------|---------|-------------| | Accept | `string?` | - | 获得/设置 上传接收的文件格式 默认为 null 接收任意格式 | | Capture | `string?` | - | 获得/设置 媒体捕获机制的首选面向模式,默认为 null | -| DefaultFileList | `List?` | - | 获得/设置 已上传文件集合,可用于组件初始化 | | IsDirectory | `bool` | - | 获得/设置 是否上传整个目录 默认为 false | | IsMultiple | `bool` | - | 获得/设置 是否允许多文件上传 默认 false 不允许 | | MaxFileCount | `int?` | - | 获得/设置 最大上传个数 默认为 null | -| OnAllFileUploaded | `Func, Task>?` | - | 获得/设置 所有文件上传完毕回调方法 默认 null | +| OnChange | `Func?` | - | 获得/设置 点击浏览按钮时回调此方法,如果多文件上传此回调会触发多次 默认 null | +| OnDelete | `Func>?` | - | 获得/设置 点击删除按钮时回调此方法 默认 null | | ShowProgress | `bool` | - | 获得/设置 是否显示上传进度 默认为 false | @@ -3515,12 +3515,12 @@ UploadPreviewList component | FileIconZip | `string?` | - | 获得/设置 Excel 类型文件图标 | | InvalidStatusIcon | `string?` | - | 获得/设置 上传失败状态图标 | | IsDisabled | `bool` | - | Gets or sets the disable status of the upload list. | -| Items | `List?` | - | Gets or sets the collection of files to be uploaded. | | LoadingIcon | `string?` | - | 获得/设置 浏览按钮图标 | -| OnCancel | `FuncGets or sets the callback method for the cancel button click event. Default is null 获得/设置 点击取消按钮回调此方法 默认 null | -| OnDelete | `Func?` | - | Gets or sets the callback method for the cancel button click event. Default is null 获得/设置 点击取消按钮回调此方法 默认 null | +| OnDelete | `Func>?` | - | 获得/设置 点击删除按钮时回调此方法 默认 null | +| OnDownload | `Func?` | - | 获得/设置 点击下载按钮回调方法 默认 null | +| OnGetFileFormat | `Func?` | - | Gets or sets the upload file format callback method. | | ShowDownloadButton | `bool` | - | 获得/设置 是否显示下载按钮 默认 false | | ShowProgress | `bool` | - | Gets or sets a value indicating whether progress should be displayed during the operation. | | ValidStatusIcon | `string?` | - | 获得/设置 上传成功状态图标 | @@ -3548,12 +3548,12 @@ UploadPreviewList component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | -| OnValueChanged | `Func?` | - | 获得/设置 Value 改变时回调方法 | | ParsingErrorMessage | `string?` | - | 获得/设置 类型转化失败格式化字符串 默认为 null | | RequiredErrorMessage | `string?` | - | 获得/设置 必填项错误文本 默认为 null 未设置 | | ShowRequired | `bool?` | - | 获得/设置 是否显示必填项标记 默认为 null 未设置 | | SkipValidate | `bool` | - | 获得/设置 是否不进行验证 默认为 false | -| ValidateRules | `List?` | - | 获得/设置 自定义验证集合 | @@ -3567,9 +3567,9 @@ UploadPreviewList component - 设置 Label 值 - `void SetValue(TValue value)` - 设置 Value 值 -- `Task ToggleMessage(IReadOnlyCollection results)` - 显示/隐藏验证结果方法 -- `Task ValidatePropertyAsync(object? propertyValue, ValidationContext context, List results)` - 属性验证方法 ### Source @@ -3587,12 +3587,12 @@ Waterfall 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | ItemMinHeight | `int` | 316 | 获得/设置 每一项最小宽度 默认 316 用于显示 loading 图标 | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 图片模板 默认为 null | | ItemWidth | `int` | 216 | 获得/设置 每一项宽度 默认 216 | | LoadTemplate | `RenderFragment?` | - | 获得/设置 加载模板 | -| OnClickItemAsync | `Func?` | - | 获得/设置 点击列表项回调方法 | +| OnRequestAsync | `Func>>?` | - | 获得/设置 请求数据回调方法 | +| Template | `RenderFragment<(WaterfallItem Item, RenderFragment Context)>?` | - | 获得/设置 模板 默认为 null | @@ -3638,4 +3638,4 @@ Watermark 组件 --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt index 0cbf4ad4729..30eb5d99c0f 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt @@ -40,9 +40,9 @@ AutoComplete component | Icon | `string?` | - | Gets or sets the icon | | IgnoreCase | `bool` | true | Gets or sets whether to ignore case when matching, default is true | | IsLikeMatch | `bool` | - | Gets or sets whether to enable fuzzy search, default is false | -| Items | `IEnumerable?` | - | Gets or sets the collection of matching data obtained by inputting a string | | LoadingIcon | `string?` | - | Gets or sets the loading icon | -| OnCustomFilter | `Func>>?` | - | Gets or sets custom collection filtering rules, default is null | | ShowDropdownListOnFocus | `bool` | true | Gets or sets whether to expand the dropdown candidate menu when focused, default is true | | ShowNoDataTip | `bool` | true | Gets or sets whether to show the no matching data option, default is true | @@ -83,10 +83,10 @@ Cascader 组件实现类 | Color | `Color` | Color.None | 获得/设置 按钮颜色 | | Icon | `string?` | - | 获得/设置 菜单指示图标 | | IsClearable | `bool` | - | 获得/设置 是否可清除 默认 false | -| Items | `IEnumerable?` | - | 获得/设置 绑定数据集 | +| OnBlurAsync | `Func?` | - | 获得/设置 失去焦点回调方法 默认 null | +| OnClearAsync | `Func?` | - | 获得/设置 清除文本内容 OnClear 回调方法 默认 null | +| OnSelectedItemChanged | `Func?` | - | 获得/设置 ValueChanged 方法 | | ParentSelectable | `bool` | true | 获得/设置 父节点是否可选择 默认 true | | PlaceHolder | `string?` | - | 获得/设置 组件 PlaceHolder 文字 默认为 请选择 ... | | ShowFullLevels | `bool` | true | 获得/设置 是否显示全路径 默认 true | @@ -113,7 +113,7 @@ Dropdown 下拉框组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| ButtonTemplate | `RenderFragment?` | - | 获得/设置 按钮内容模板 | | Color | `Color` | Color.Primary | 获得/设置 颜色 默认 Color.Primary 无设置 | | Direction | `Direction` | - | 获得/设置 下拉选项方向 默认 Dropdown 向下 | | FixedButtonText | `string?` | - | 获得/设置 固定按钮显示文字 默认 null | @@ -121,17 +121,17 @@ Dropdown 下拉框组件 | IsAsync | `bool` | - | 获得/设置 是否为异步按钮,默认为 false 如果为 true 表示是异步按钮,点击按钮后禁用自身并且等待异步完成,过程中显示 loading 动画 为 true 时生效 | | IsFixedButtonText | `bool` | - | 获得/设置 是否固定按钮文字 更改下拉框选项时按钮文字保持不变 默认 false 不固定 | | IsKeepDisabled | `bool` | - | 获得/设置 是否异步结束后是否保持禁用状态,默认为 false | -| Items | `IEnumerable?` | - | 获得/设置 绑定数据集 | | ItemsTemplate | `RenderFragment?` | - | 获得/设置 Items 模板 默认 null | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 选项模板 | | LoadingIcon | `string?` | - | 获得/设置 正在加载动画图标 默认为 fa-solid fa-spin fa-spinner | | MenuAlignment | `Alignment` | - | 获得/设置 获取菜单对齐方式 默认 none 未设置 | -| OnClickWithoutRender | `Func 为 true 时生效 | -| OnSelectedItemChanged | `Func?` | - | 获得/设置 OnClick 事件不刷新父组件 为 true 时生效 | +| OnSelectedItemChanged | `Func?` | - | SelectedItemChanged 回调方法 | | ShowFixedButtonTextInDropdown | `bool` | - | 获得/设置 下拉菜单中是否显示固定文字 默认 false 不显示 | | ShowSplit | `bool` | - | 获得/设置 是否开启分裂式 默认 false | | Size | `Size` | - | 获得/设置 组件尺寸 默认 none 未设置 | -| OnClick | `EventCallback 为 true 时生效 | +| OnClick | `EventCallback` | - | 获得/设置 OnClick 事件 为 true 时生效 | @@ -139,7 +139,7 @@ Dropdown 下拉框组件 | Event | Type | Description | |-------|------|-------------| -| OnClick | `EventCallback 为 true 时生效 | +| OnClick | `EventCallback` | 获得/设置 OnClick 事件 为 true 时生效 | ### Source @@ -159,8 +159,8 @@ DropdownItem 组件 | ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 | | Disabled | `bool` | - | 获得/设置 是否被禁用 默认 false 优先级低于 | | Icon | `string?` | - | 获得/设置 图标 | -| OnClick | `Func | +| OnClick | `Func?` | - | 获得/设置 点击回调方法 默认 null | +| OnDisabledCallback | `Func?` | - | 获得/设置 是否被禁用回调方法 默认 null 优先级高于 | | Text | `string?` | - | 获得/设置 显示文本 | @@ -180,9 +180,9 @@ DropdownWidget 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | ChildContent | `RenderFragment?` | - | 获得/设置 选项模板支持静态数据 | -| Items | `IEnumerable?` | - | 获得/设置 挂件数据集合 | +| OnItemCloseAsync | `Func?` | - | 获得/设置 下拉项关闭回调方法 | +| OnItemShownAsync | `Func?` | - | 获得/设置 下拉项关闭回调方法 | @@ -215,7 +215,7 @@ MultiSelect component | ClearText | `string?` | - | 获得/设置 全选按钮显示文本 | | CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 默认为 null | | DefaultVirtualizeItemText | `string?` | - | Gets or sets the default virtualize items text. | -| DisplayTemplate | `RenderFragment>?` | - | 获得/设置 显示部分模板 默认 null | | EditSubmitKey | `EditSubmitKey` | - | 获得/设置 编辑提交按键 默认 Enter | | IsFixedHeight | `bool` | - | 获得/设置 是否固定高度 默认 false | | IsSingleLine | `bool` | - | 获得/设置 是否为单行模式 默认 false | @@ -223,8 +223,8 @@ MultiSelect component | MaxErrorMessage | `string?` | - | 获得/设置 设置最大值时错误消息文字 | | Min | `int` | - | 获得/设置 选项最小数 默认为 0 不限制 | | MinErrorMessage | `string?` | - | 获得/设置 设置最小值时错误消息文字 | -| OnEditCallback | `Func返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 | -| OnSelectedItemsChanged | `Func>?` | - | 获得/设置 编辑模式下输入选项更新后回调方法 默认 null 返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 | +| OnSelectedItemsChanged | `Func, Task>?` | - | 获得/设置 选中项集合发生改变时回调委托方法 | | ReverseSelectText | `string?` | - | 获得/设置 全选按钮显示文本 | | SelectAllText | `string?` | - | 获得/设置 全选按钮显示文本 | | ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 默认为 true 显示 | @@ -247,7 +247,7 @@ MultiSelect component - `Task ToggleRow(string val)` - 切换当前选项方法 - *[JSInvokable]* -- `Task TriggerEditTag(string val)` - 客户端编辑提交数据回调方法 - *[JSInvokable]* @@ -270,7 +270,7 @@ MultiSelect component | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `List?` | - | Gets or sets the filter items. | @@ -299,26 +299,26 @@ MultiSelectGeneric component | CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 默认为 null | | CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 | | DefaultVirtualizeItemText | `string?` | - | Gets or sets the default virtualize items text. | -| DisplayTemplate | `RenderFragment>>?` | - | 获得/设置 显示部分模板 默认 null | | EditSubmitKey | `EditSubmitKey` | - | 获得/设置 编辑提交按键 默认 Enter | | IsFixedHeight | `bool` | - | 获得/设置 是否固定高度 默认 false | | IsSingleLine | `bool` | - | 获得/设置 是否为单行模式 默认 false | -| Items | `IEnumerable>?` | - | Gets or sets the items. | +| ItemTemplate | `RenderFragment>?` | - | Gets or sets the item template. | | Max | `int` | - | 获得/设置 选项最大数 默认为 0 不限制 | | MaxErrorMessage | `string?` | - | 获得/设置 设置最大值时错误消息文字 | | Min | `int` | - | 获得/设置 选项最小数 默认为 0 不限制 | | MinErrorMessage | `string?` | - | 获得/设置 设置最小值时错误消息文字 | -| OnEditCallback | `Func返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 | -| OnQueryAsync | `Func>?` | - | 获得/设置 编辑模式下输入选项更新后回调方法 默认 null 返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 | +| OnQueryAsync | `Func>>>?` | - | Gets or sets the callback method for loading virtualized items. | +| OnSearchTextChanged | `Func>>?` | - | Gets or sets the callback method when the search text changes. | +| OnSelectedItemsChanged | `Func>, Task>?` | - | 获得/设置 选中项集合发生改变时回调委托方法 | | ReverseSelectText | `string?` | - | 获得/设置 全选按钮显示文本 | | SelectAllText | `string?` | - | 获得/设置 全选按钮显示文本 | | ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 默认为 true 显示 | | ShowDefaultButtons | `bool` | true | 获得/设置 是否显示默认功能按钮 默认为 true 显示 | | ShowToolbar | `bool` | - | 获得/设置 是否显示功能按钮 默认为 false 不显示 | -| ValueEqualityComparer | `Func提供此回调方法时忽略 属性 | +| ValueEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | @@ -454,16 +454,16 @@ Select component |-----------|------|---------|-------------| | DefaultVirtualizeItemText | `string?` | - | Gets or sets the default text for virtualized items. Default is null. | | DisableItemChangedWhenFirstRender | `bool` | - | Gets or sets whether to disable the OnSelectedItemChanged callback method on first render. Default is false. | -| DisplayTemplate | `RenderFragment?` | - | Gets or sets the display template. Default is null. | | IsAutoClearSearchTextWhenCollapsed | `bool` | - | Gets or sets whether auto clear the search text when dropdown closed. | | IsUseDefaultItemWhenValueIsNull | `bool` | - | 获得/设置 值为 null 时是否使用第一个选项或者标记为 active 的候选项作为默认值 Gets or sets a value indicating Whether to use the first option or the candidate marked as active as the default value when the value is null | | LookupService | `ILookupService?` | - | | | LookupServiceData | `object?` | - | | | LookupServiceKey | `string?` | - | | -| OnBeforeSelectedItemChange | `FuncGets or sets the callback method before the selected item changes. Returns true to change the selected item value; otherwise, the selected item value does not change. | -| OnCollapsed | `Func>?` | - | 获取/设置 选中项改变前的回调方法。返回 true 则改变选中项的值;否则选中项的值不变。 Gets or sets the callback method before the selected item changes. Returns true to change the selected item value; otherwise, the selected item value does not change. | +| OnCollapsed | `Func?` | - | Gets or sets the dropdown collapsed callback method. | +| OnInputChangedCallback | `Func?` | - | Gets or sets the callback method when the input value changes. Default is null. | +| OnSelectedItemChanged | `Func?` | - | Gets or sets the callback method when the selected item changes. | | Options | `RenderFragment?` | - | Gets or sets the options template for static data. | | ShowSwal | `bool` | - | Gets or sets whether to show the Swal confirmation popup. Default is false. 获得/设置 是否显示 Swal 确认弹窗 默认值 为 false | | SwalCategory | `SwalCategory` | SwalCategory.Question | Gets or sets the Swal category. Default is Question. | @@ -508,12 +508,12 @@ SelectBase component base class | ClearIcon | `string?` | - | Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up. | | Color | `Color` | - | Gets or sets the color. The default is (no color). | | DropdownIcon | `string?` | - | Gets or sets the dropdown icon. The default is "fa-solid fa-angle-up". | -| GroupItemTemplate | `RenderFragment?` | - | Gets or sets the group item template. | | IsClearable | `bool` | - | Gets or sets whether the select component is clearable. Default is false. | | IsMarkupString | `bool` | - | Gets or sets a value indicating whether the content is a . The default is false. | | IsVirtualize | `bool` | - | Gets or sets whether virtual scrolling is enabled. Default is false. | | NoSearchDataText | `string?` | - | Gets or sets the text to display when no search results are found. | -| OnClearAsync | `Func?` | - | Gets or sets the callback method when the clear button is clicked. Default is null. | | OverscanCount | `int` | 4 | Gets or sets the overscan count for virtual scrolling. Default is 4. | | PlaceHolder | `string?` | - | Gets or sets the placeholder text. | | RowHeight | `float` | 33f | Gets or sets the row height for virtual scrolling. Default is 33. | @@ -556,28 +556,28 @@ Select 泛型组件实现类 |-----------|------|---------|-------------| | CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 | | DisableItemChangedWhenFirstRender | `bool` | - | 获得/设置 禁止首次加载时触发 OnSelectedItemChanged 回调方法 默认 false | -| DisplayTemplate | `RenderFragment?>?` | - | 获得/设置 显示部分模板 默认 null | | IsEditable | `bool` | - | 获得/设置 是否可编辑 默认 false | -| Items | `IEnumerable>?` | - | 获得/设置 绑定数据集 | +| ItemTemplate | `RenderFragment>?` | - | 获得/设置 选项模板 | +| OnBeforeSelectedItemChange | `Func, Task>?` | - | 获得/设置 下拉框项目改变前回调委托方法 返回 true 时选项值改变,否则选项值不变 | +| OnInputChangedCallback | `Func?` | - | 获得/设置 选项输入更新后回调方法 默认 null | +| OnQueryAsync | `Func>>>?` | - | 虚拟滚动数据加载回调方法 | +| OnSearchTextChanged | `Func>>?` | - | 获得/设置 搜索文本发生变化时回调此方法 | +| OnSelectedItemChanged | `Func, Task>?` | - | SelectedItemChanged 回调方法 | | Options | `RenderFragment?` | - | 获得/设置 选项模板支持静态数据 | | SwalCategory | `SwalCategory` | SwalCategory.Question | 获得/设置 Swal 图标 默认 Question | | SwalContent | `string?` | - | 获得/设置 Swal 内容 默认 null | | SwalFooter | `string?` | - | 获得/设置 Footer 默认 null | | SwalTitle | `string?` | - | 获得/设置 Swal 标题 默认 null | -| TextConvertToValueCallback | `Func返回值为 null 时放弃操作 | -| ValueEqualityComparer | `Func提供此回调方法时忽略 属性 | +| TextConvertToValueCallback | `Func>?` | - | 获得/设置 选项输入更新后转换为 Value 回调方法 默认 null 返回值为 null 时放弃操作 | +| ValueEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | ### Public Methods -- `void Add(SelectedItem item)` - 添加静态下拉项方法 - `Task ConfirmSelectedItem(int index)` - 客户端回车回调方法 @@ -607,18 +607,18 @@ Select 组件实现类 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| ChildContent | `RenderFragment>?` | - | 获得/设置 下拉列表内容模板 **[Required]** | +| GetTextCallback | `Func?` | - | 获得 显示文字回调方法 默认 null **[Required]** | | ClearIcon | `string?` | - | 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up | | Color | `Color` | - | 获得/设置 颜色 默认 Color.None 无设置 | | DropdownIcon | `string?` | - | 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up | | DropdownMinWidth | `int?` | - | 获得/设置 弹窗最小宽度 默认为 null 未设置使用样式中的默认值 | | Height | `int` | 486 | 获得/设置 弹窗高度 默认 486px; | | IsClearable | `bool` | - | 获得/设置 是否可清除 默认 false | -| OnClearAsync | `Func?` | - | 获得/设置 清除文本内容 OnClear 回调方法 默认 null | | PlaceHolder | `string?` | - | 获得 PlaceHolder 属性 | | ShowAppendArrow | `bool` | true | 获得/设置 是否显示组件右侧扩展箭头 默认 true 显示 | -| Template | `RenderFragment?` | - | 获得/设置 Value 显示模板 默认 null | @@ -648,15 +648,15 @@ Select 组件实现类 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `List>?` | - | 获得/设置 带层次数据集合 **[Required]** | | CanExpandWhenDisabled | `bool` | false | Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. | | Color | `Color` | - | 获得/设置 颜色 默认 Color.None 无设置 | | CustomKeyAttribute | `Type` | typeof(KeyAttribute) | | | DropdownIcon | `string?` | - | 获得/设置 下拉箭头 Icon 图标 | | IsEditable | `bool` | - | 获得/设置 是否可编辑 默认 false | -| ModelEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null | +| OnExpandNodeAsync | `Func, Task>>>?` | - | 获得/设置 点击节点获取子数据集合回调方法 | +| OnSelectedItemChanged | `Func?` | - | SelectedItemChanged 回调方法 | | PlaceHolder | `string?` | - | 获得 PlaceHolder 属性 | | ShowIcon | `bool` | - | 获得/设置 是否显示 Icon 图标 默认 false 不显示 | | ShowResetSearchButton | `bool` | true | 获得/设置 是否显示重置搜索栏按钮 默认 true 显示 | @@ -692,10 +692,10 @@ SimpleSelectBase component base class | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | IsEditable | `bool` | - | Gets or sets whether the select component is editable. Default is false. | -| Items | `IEnumerable?` | - | Gets or sets the items. | +| ItemTemplate | `RenderFragment?` | - | Gets or sets the item template. | +| OnQueryAsync | `Func>>?` | - | Gets or sets the callback method for loading virtualized items. | +| OnSearchTextChanged | `Func>?` | - | Gets or sets the callback method when the search text changes. | @@ -719,8 +719,8 @@ SubCascader 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | 获得/设置 组件数据源 | +| OnClick | `Func?` | - | 获得/设置 选择项点击回调委托 | | SubMenuIcon | `string?` | - | 获得/设置 子菜单指示图标 | @@ -743,27 +743,27 @@ SubCascader 组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | 获得/设置 组件绑定数据项集合 **[Required]** | | Height | `string?` | - | 获得/设置 组件高度 默认值 null 未设置 | | IsWrapItem | `bool` | true | 获得/设置 候选项是否为换行模式 默认 false 不换行 | | IsWrapItemText | `bool` | - | 获得/设置 候选项文本是否为换行 默认 false 不换行 | | ItemWidth | `string?` | - | 获得/设置 候选项宽度 默认 null 未设置 | | LeftButtonText | `string?` | - | 获得/设置 左侧按钮显示文本 | -| LeftHeaderTemplate | `RenderFragment>?` | - | 获得/设置 左侧 Panel Header 模板 | | LeftIcon | `string?` | - | 获得/设置 向左侧转移图标 | -| LeftItemTemplate | `RenderFragment?` | - | 获得/设置 左侧 Panel Item 模板 | | LeftPanelSearchPlaceHolderString | `string?` | - | 获得/设置 左侧面板搜索框 placeholder 文字 | | LeftPanelText | `string?` | - | 获得/设置 左侧面板 Header 显示文本 | | Max | `int` | - | 获得/设置 右侧面板包含的最大数量, 默认为 0 不限制 | | MaxErrorMessage | `string?` | - | 获得/设置 设置最大值时错误消息文字 | | Min | `int` | - | 获得/设置 右侧面板包含的最大数量,默认为 0 不限制 | | MinErrorMessage | `string?` | - | 获得/设置 设置最小值时错误消息文字 | -| OnSelectedItemsChanged | `Func, Task>?` | - | 获得/设置 选中项集合发生改变时回调委托方法 | +| OnSetItemClass | `Func?` | - | 获得/设置 数据样式回调方法 默认为 null | | RightButtonText | `string?` | - | 获得/设置 右侧按钮显示文本 | -| RightHeaderTemplate | `RenderFragment>?` | - | 获得/设置 右侧 Panel Header 模板 | | RightIcon | `string?` | - | 获得/设置 向右侧转移图标 | -| RightItemTemplate | `RenderFragment?` | - | 获得/设置 右侧 Panel Item 模板 | | RightPanelSearchPlaceHolderString | `string?` | - | 获得/设置 右侧面板搜索框 placeholder 文字 | | RightPanelText | `string?` | - | 获得/设置 右侧面板 Header 显示文本 | | ShowSearch | `bool` | - | 获得/设置 是否显示搜索框 | @@ -785,12 +785,12 @@ TransferPanelBase 穿梭框面板组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| HeaderTemplate | `RenderFragment>?` | - | 获得/设置 Header 模板 | | IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | -| Items | `List?` | - | 获得/设置 数据集合 | +| ItemTemplate | `RenderFragment?` | - | 获得/设置 Item 模板 | +| OnSelectedItemsChanged | `Func?` | - | 获得/设置 选项状态变化时回调方法 | +| OnSetItemClass | `Func?` | - | 获得/设置 数据样式回调方法 默认为 null | | SearchIcon | `string?` | - | 获得/设置 搜索框图标 | | SearchPlaceHolderString | `string?` | - | 获得/设置 搜索框的 placeholder 字符串 | | ShowSearch | `bool` | - | 获得/设置 是否显示搜索框 | @@ -804,4 +804,4 @@ TransferPanelBase 穿梭框面板组件 --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt index a2e8a6a8d51..588873095dd 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt @@ -29,30 +29,30 @@ | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| GetTextCallback | `Func?` | - | 获得 显示文字回调方法 默认 null **[Required]** | +| OnQueryAsync | `Func>>?` | - | 异步查询回调方法 **[Required]** | | AutoGenerateColumns | `bool` | - | 获得/设置 是否自动生成列信息 默认为 false | | ClearIcon | `string?` | - | 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up | | CollapsedTopSearch | `bool` | - | 获得/设置 是否收缩顶部搜索框 默认为 false 不收缩搜索框 是否显示搜索框请设置 值 Top | | Color | `Color` | - | 获得/设置 颜色 默认 Color.None 无设置 | | CustomerSearchModel | `ITableSearchModel?` | - | 获得/设置 自定义搜索模型 | -| CustomerSearchTemplate | `RenderFragment | +| CustomerSearchTemplate | `RenderFragment?` | - | 获得/设置 自定义搜索模型模板 | | DropdownIcon | `string?` | - | 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up | | EmptyTemplate | `RenderFragment?` | - | 获得/设置 无数据时显示模板 默认 null | | Height | `int` | 486 | 获得/设置 表格高度 默认 486px | | IsClearable | `bool` | - | 获得/设置 是否可清除 默认 false | | IsPagination | `bool` | - | 获得/设置 是否分页 默认为 false | -| OnClearAsync | `Func?` | - | 获得/设置 清除文本内容 OnClear 回调方法 默认 null | +| PageItemsSource | `IEnumerable?` | - | 获得/设置 每页显示数据数量的外部数据源 | | PlaceHolder | `string?` | - | 获得 PlaceHolder 属性 | | SearchModel | `TItem` | new() | 获得/设置 SearchModel 实例 | -| SearchTemplate | `RenderFragment?` | - | 获得/设置 SearchTemplate 实例 | | ShowAppendArrow | `bool` | true | 获得/设置 是否显示组件右侧扩展箭头 默认 true 显示 | | ShowEmpty | `bool` | - | 获得/设置 是否显示无数据空记录 默认 false 不显示 | | ShowSearch | `bool` | - | 获得/设置 是否显示搜索框 默认为 false 不显示搜索框 | -| TableColumns | `RenderFragment?` | - | 获得/设置 TableHeader 实例 | | TableMinWidth | `int?` | - | 获得/设置 弹窗表格最小宽度 默认为 null 未设置使用样式中的默认值 | -| Template | `RenderFragment?` | - | 获得/设置 Value 显示模板 默认 null | @@ -118,7 +118,7 @@ Table 组件基类 | CheckboxColumnWidth | `int` | - | 获得/设置 复选框宽度 默认 36 | | ClientTableName | `string?` | - | 获得/设置 客户端表格名称 默认 null 用于客户端列宽与列顺序持久化功能 | | ColumnMinWidth | `int?` | - | 获得/设置 列最小宽度 默认 null 未设置 可通过 统一设置 | -| ColumnOrderCallback | `Func, IEnumerable>?` | - | 获得/设置 自定义列排序规则 默认 null 未设置 使用内部排序机制 1 2 3 0 -3 -2 -1 顺序 | | ColumnToolboxIcon | `string?` | - | 获得/设置 列工具栏图标 fa-solid fa-gear | | ColumnWidthTooltipPrefix | `string?` | - | 获得/设置 列调整提示前缀文字 默认 null 未设置使用资源文件中文字 | | CopyColumnCopiedTooltipText | `string?` | - | 获得/设置 列拷贝完毕后 Tooltip 文字 | @@ -126,11 +126,11 @@ Table 组件基类 | CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 | | DefaultFixedColumnWidth | `int` | 200 | 获得/设置 默认固定列宽度 默认 200 单位 px | | DetailColumnWidth | `int` | - | 获得/设置 明细行 Row Header 宽度 默认 24 | -| DetailRowTemplate | `RenderFragment | -| DisableAddButtonCallback | `Func?` | - | 获得/设置 明细行模板 | +| DisableAddButtonCallback | `Func, bool>?` | - | 获得/设置 新建按钮是否禁用回调方法 默认 null 未设置 | | DisableAutoSubmitFormByEnter | `bool?` | - | 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 | -| DisableDeleteButtonCallback | `Func, bool>?` | - | 获得/设置 删除按钮是否禁用回调方法 默认 null 未设置 | +| DisableEditButtonCallback | `Func, bool>?` | - | 获得/设置 编辑按钮是否禁用回调方法 默认 null 未设置 | | DynamicContext | `IDynamicobjectContext?` | - | 获得/设置 动态数据上下文实例 | | EditDialogItemsPerRow | `int` | 2 | 获得/设置 每行显示组件数量 默认为 2 | | EditDialogLabelAlign | `Alignment` | - | 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 | @@ -140,8 +140,8 @@ Table 组件基类 | EmptyText | `string?` | - | 获得/设置 无数据时显示文本 默认取资源文件 英文 NoData 中文 无数据 | | EnableKeyboardNavigationCell | `bool` | true | 获得/设置 是否启用 Excel 模式下的键盘导航功能 默认 true | | FitColumnWidthIncludeHeader | `bool` | - | 获得/设置 列宽自适应时是否包含表头 默认 false | -| FooterTemplate | `RenderFragment>?` | - | 获得/设置 Table Footer 模板 | +| GetAdvancedSearchFilterCallback | `Func?>?` | - | 获得/设置 获得高级搜索条件回调方法 默认 null | | HeaderStyle | `TableHeaderStyle` | TableHeaderStyle.None | 获取/设置 表格 thead 样式 ,默认为浅色 | | HeaderTextWrap | `bool` | - | 获得/设置 是否表头允许折行 默认 false 不折行 此设置为 true 时覆盖 参数值 | | Height | `int?` | - | 获得/设置 Table 高度 默认为 null | @@ -159,45 +159,45 @@ Table 组件基类 | IsPopoverToolbarDropdownButton | `bool` | - | 获得/设置 工具栏下拉框按钮是否 IsPopover 默认 false | | IsStriped | `bool` | - | 获得/设置 是否斑马线样式 默认为 false | | IsTracking | `bool` | - | 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false | -| Items | `IEnumerable 回调委托 | +| Items | `IEnumerable?` | - | 获得/设置 数据集合,适用于无功能仅做数据展示使用,高级功能时请使用 回调委托 | | LineNoColumnAlignment | `Alignment` | - | 获得/设置 行号内容位置 | | LineNoColumnWidth | `int` | - | 获得/设置 行号列宽度 默认 60 | | LoadingTemplate | `RenderFragment?` | - | 获得/设置 Loading 模板 | -| ModelEqualityComparer | `Func提供此回调方法时忽略 属性 | +| ModelEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | | MultiHeaderTemplate | `RenderFragment?` | - | 获得/设置 多表头模板 | | NotSupportedColumnFilterMessage | `string?` | - | 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 | -| OnAfterRenderCallback | `Func, bool, Task>?` | - | 获得/设置 Table 组件渲染完毕回调 | +| OnAutoFitColumnWidthCallback | `Func>?` | - | 获得/设置 自动调整列宽回调方法 | +| OnBeforeRenderRow | `Action?` | - | 获得/设置 呈现每行之前的回调 | +| OnClickRowCallback | `Func?` | - | 获得/设置 单击行回调委托方法 | +| OnColumnCreating | `Func, Task>?` | - | 获得/设置 列创建时回调委托方法 | +| OnDoubleClickCellCallback | `Func?` | - | 获得/设置 双击单元格回调委托 | +| OnDoubleClickRowCallback | `Func?` | - | 获得/设置 双击行回调委托方法 | +| OnDragColumnEndAsync | `Func, Task>?` | - | 获得/设置 拖动列结束回调方法,默认 null 可存储数据库用于服务器端保持列顺序 | +| OnResizeColumnAsync | `Func?` | - | 获得/设置 设置列宽回调方法 | +| OnToggleDetailRowCallback | `Func?` | - | 获得/设置 展开收起明细行回调方法 第二个参数 true 时表示展开 false 时表示收起 | | OverscanCount | `int` | 10 | Gets or sets the overscan count for virtual scrolling. Default is 10. | -| RowContentTemplate | `RenderFragment>?` | - | 获得/设置 行内容模板 | | RowHeight | `float` | 38f | 获得/设置 虚拟滚动行高 默认为 38 | -| RowTemplate | `RenderFragment>?` | - | 获得/设置 行模板 | | ScrollHoverWidth | `int?` | - | 获得/设置 滚动条 hover 状态下宽度 默认 null 未设置使用 配置类中的 | | ScrollMode | `ScrollMode` | - | 获得/设置 数据滚动模式 | | ScrollWidth | `int?` | - | 获得/设置 滚动条宽度 默认 null 未设置使用 配置类中的 | | ShowCheckboxTextColumnWidth | `int` | - | 获得/设置 显示文字的复选框列宽度 默认 80 | | ShowColumnWidthTooltip | `bool` | - | 获得/设置 是否显示列宽提示信息,默认 false 显示 | | ShowCopyColumnTooltip | `bool` | true | 获得/设置 CopyColumn Tooltip 默认 true | -| ShowDetailRow | `Func?` | - | 获得/设置 是否显示每行的明细行展开图标 | | ShowEmpty | `bool` | - | 获得/设置 是否显示无数据空记录 默认 false 不显示 | | ShowFilterHeader | `bool` | - | 获得/设置 是否显示过滤表头 默认 false 不显示 | | ShowFooter | `bool` | - | 获得/设置 是否显示表脚 默认为 false | | ShowMultiFilterHeader | `bool` | - | 获得/设置 是否显示过滤表头 默认 false 不显示 | | SortAscText | `string?` | - | 获得/设置 升序排序时 tooltip 显示文字 默认点击降序 | | SortDescText | `string?` | - | 获得/设置 降序排序时 tooltip 显示文字 默认取消排序 | -| TableColumns | `RenderFragment?` | - | 获得/设置 TableHeader 实例 | +| TableFooter | `RenderFragment>?` | - | 获得/设置 TableFooter 实例 | | TableSize | `TableSize` | - | 获得/设置 表格组件大小 默认为 Normal 正常模式 | | UnsetText | `string?` | - | 获得/设置 未设置排序时 tooltip 显示文字 默认点击升序 | -| ItemsChanged | `EventCallback>` | - | 获得/设置 数据集合回调方法 | @@ -205,11 +205,11 @@ Table 组件基类 | Event | Type | Description | |-------|------|-------------| -| ItemsChanged | `EventCallback>` | 获得/设置 数据集合回调方法 | ### Public Methods -- `Task AutoFitColumnWidthCallback(string fieldName, float calcWidth)` - 列宽自适应回调方法 由 JavaScript 脚本调用 - *[JSInvokable]* - `Task DragColumnCallback(int originIndex, int currentIndex)` @@ -223,7 +223,7 @@ Table 组件基类 - Reset all Columns Filter - `Task ResetSortAsync()` - Reset all Columns Sort -- `void ResetVisibleColumns(IEnumerable columns)` - 设置 列可见方法 - `Task ResizeColumnCallback(int index, float width)` - 设置列宽方法 由 JavaScript 脚本调用 @@ -246,12 +246,12 @@ Table 高级排序弹窗的内容组件 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | 获得/设置 可排序列的列表 | | MinusIcon | `string?` | - | 获得/设置 减少排序条件图标 | | PlusIcon | `string?` | - | 获得/设置 增加排序条件图标 | | RemoveIcon | `string?` | - | 获得/设置 移除排序条件图标 | -| Value | `List?` | - | 获得/设置 排序列列表 实例值 | +| ValueChanged | `EventCallback>` | - | 获得/设置 排序列列表 回调方法 支持双向绑定 | @@ -259,7 +259,7 @@ Table 高级排序弹窗的内容组件 | Event | Type | Description | |-------|------|-------------| -| ValueChanged | `EventCallback>` | 获得/设置 排序列列表 回调方法 支持双向绑定 | ### Public Methods @@ -312,7 +312,7 @@ TableExtensionButton 表格扩展按钮类 | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | ChildContent | `RenderFragment?` | - | Specifies the content to be rendered inside this | -| OnClickButton | `Func?` | - | 获得/设置 扩展按钮点击回调方法 | @@ -339,11 +339,11 @@ TableFooterCell 组件 |-----------|------|---------|-------------| | Aggregate | `AggregateType` | - | 获得/设置 聚合方法枚举 默认 Sum | | Align | `Alignment` | - | 获得/设置 文字对齐方式 默认为 Alignment.None | -| ColspanCallback | `Func?` | - | 获得/设置 colspan 值 默认 null 自己手动设置值 | +| CustomerAggregateCallback | `Func?` | - | 获得/设置 自定义统计列回调方法 | | Field | `string?` | - | 获得/设置 统计列名称 默认为 null 不参与统计仅作为显示单元格 | | FormatString | `string?` | - | 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd | -| Formatter | `Func>?` | - | 获得/设置 列格式化回调委托 | | ShownWithBreakPoint | `BreakPoint` | - | 获得/设置 显示节点阈值 默认值 BreakPoint.None 未设置 | | Text | `string?` | - | 获得/设置 单元格内容 | @@ -372,7 +372,7 @@ Table Toolbar 组件 | ChildContent | `RenderFragment?` | - | Specifies the content to be rendered inside this | | GearIcon | `string?` | - | 获得/设置 移动端按钮图标 | | IsAutoCollapsedToolbarButton | `bool` | true | 获得/设置 是否自动收缩工具栏按钮 默认 true | -| OnGetSelectedRows | `Func>?` | - | 获得/设置 按钮点击后回调委托 | | ShowColorWhenToolbarButtonsCollapsed | `bool` | - | 获得/设置 工具栏按钮收缩后是否继承原先按钮的颜色样式 默认 false | @@ -390,4 +390,4 @@ Table Toolbar 组件 --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt index b303364649b..1cd8d34976f 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt @@ -41,11 +41,11 @@ Tree 组件 | ClickToggleNode | `bool` | - | 获得/设置 是否点击节点时展开或者收缩子项 默认 false | | ExpandNodeIcon | `string?` | - | 获得/设置 Tree Node 展开节点图标 | | IsAccordion | `bool` | - | 获得/设置 是否为手风琴效果 默认为 false | -| Items | `List?` | - | 获得/设置 菜单数据集合 | | NodeIcon | `string?` | - | 获得/设置 Tree Node 节点图标 | -| OnExpandNode | `Func?` | - | 获得/设置 节点展开前回调委托 | +| OnTreeItemChecked | `Func, Task>?` | - | 获得/设置 树形控件节点选中时回调委托 | +| OnTreeItemClick | `Func?` | - | 获得/设置 树形控件节点点击时回调委托 | | ShowCheckbox | `bool` | - | 获得/设置 是否显示 CheckBox 默认 false 不显示 | | ShowIcon | `bool` | - | 获得/设置 是否显示 Icon 图标 默认 false 不显示 | | ShowRadio | `bool` | - | 获得/设置 是否显示 Radio 默认 false 不显示 | @@ -55,7 +55,7 @@ Tree 组件 ### Public Methods -- `IEnumerable GetCheckedItems()` - 获得 所有选中节点集合 ### Source @@ -91,19 +91,19 @@ Tree component | IsAccordion | `bool` | - | Gets or sets whether the tree view has accordion behavior. Default is false. Accordion behavior is not supported in virtual scrolling mode. | | IsDisabled | `bool` | - | Gets or sets whether the entire component is disabled. Default is false. | | IsVirtualize | `bool` | - | Gets or sets whether to enable virtual scrolling. Default is false. | -| Items | `List>?` | - | Gets or sets the hierarchical data collection. | | LoadingIcon | `string?` | - | Gets or sets the loading icon for tree nodes. | | MaxSelectedCount | `int` | - | Gets or sets the maximum number of selected items. | -| ModelEqualityComparer | `Func | +| ModelEqualityComparer | `Func?` | - | | | NodeIcon | `string?` | - | Gets or sets the icon for tree nodes. | -| OnBeforeTreeItemClick | `FuncIf return true will update the tree text value, otherwise will not update. | +| OnBeforeTreeItemClick | `Func, Task>?` | - | 获得/设置 点击节点前回调方法 | +| OnDragItemEndAsync | `Func, Task>?` | - | 获得/设置 拖动标签页结束回调方法 | +| OnExpandNodeAsync | `Func, Task>>>?` | - | Gets or sets the callback method to get child data when a node is expanded. | +| OnMaxSelectedCountExceed | `Func?` | - | Gets or sets the callback method when the maximum number of selected items is exceeded. | +| OnSearchAsync | `Func>?>>?` | - | Gets or sets the search callback method. Default is null. | +| OnTreeItemChecked | `Func>, Task>?` | - | Gets or sets the callback method when a tree item is checked. | +| OnTreeItemClick | `Func, Task>?` | - | Gets or sets the callback method when a tree item is clicked. | +| OnUpdateCallbackAsync | `Func>?` | - | Gets or sets the update the tree text value callback. Default is null. If return true will update the tree text value, otherwise will not update. | | OverscanCount | `int` | 10 | Gets or sets the overscan count for virtual scrolling. Default is 10. | | RowHeight | `float` | 29f | Gets or sets the row height for virtual scrolling. Default is 29f. | | ScrollIntoViewOptions | `ScrollIntoViewOptions?` | - | Gets or sets the scroll into view options for keyboard navigation. Default is null, using { behavior: "smooth", block: "nearest", inline: "start" }. | @@ -115,10 +115,10 @@ Tree component | ShowSearch | `bool` | - | Gets or sets whether to show the search bar. Default is false. | | ShowSkeleton | `bool` | - | Gets or sets whether to show the loading skeleton. Default is false. | | ShowToolbar | `bool` | - | Gets or sets whether show the toolbar of tree view item. Default is false. | -| ShowToolbarCallback | `Func, Task>?` | - | Gets or sts A callback method that determines whether to show the toolbar of the tree view item. | | ToolbarEditLabelText | `string?` | - | Gets or sets the title of the popup-window. Default is null. | | ToolbarEditTitle | `string?` | - | Gets or sets the title of the popup-window. Default is null. | -| ToolbarTemplate | `RenderFragment?` | - | Gets or sets the toolbar content template. Default is null. | @@ -128,16 +128,16 @@ Tree component - Clear all selected nodes - `bool Equals(TItem? x, TItem? y)` - Check if the data is the same -- `IEnumerable> GetCheckedItems()` - Gets all selected node collections -- `Task> GetParentsState(List items)` - Client-side method to query the state of the specified row checkbox, called by JavaScript - *[JSInvokable]* -- `void SetActiveItem(TreeViewItem? item)` - Set the active node - `void SetActiveItem(TItem item)` - Set the active node -- `void SetItems(List> items)` - Set the data source method for - `ValueTask TriggerDragEnd(int originIndex, int currentIndex, bool isChildren)` - Triggers the end of a drag-and-drop operation within the tree view. @@ -170,22 +170,22 @@ TreeViewRow component | Index | `int` | - | Gets or sets the node index. Default is 0. | | IsActive | `bool` | - | Gets or sets whether the node is active. Default is false. | | IsDisabled | `bool` | - | Gets or sets whether the entire component is disabled. Default is false. | -| Item | `TreeViewItem?` | - | Gets or sets the tree node item. Default is null. | | LoadingIcon | `string?` | - | Gets or sets the loading icon for tree nodes. | | MaxSelectedCount | `int` | - | Gets or sets the maximum number of selected items. | | NodeIcon | `string?` | - | Gets or sets the icon for tree nodes. | -| OnBeforeStateChangedCallback | `FuncIf return true will update the tree text value, otherwise will not update. | +| OnBeforeStateChangedCallback | `Func, CheckboxState, Task>?` | - | Gets or sets the callback that is invoked before the node state changes. | +| OnCheckStateChanged | `Func, CheckboxState, Task>?` | - | Get or sets the node checkbox state change event callback. | +| OnClick | `Func, Task>?` | - | Gets or sets the click event callback. Default is null. | +| OnToggleNodeAsync | `Func, Task>?` | - | Get or sets the node click event callback. | +| OnUpdateCallbackAsync | `Func>?` | - | Gets or sets the update the tree text value callback. Default is null. If return true will update the tree text value, otherwise will not update. | | ShowCheckbox | `bool` | - | Gets or sets whether to show checkboxes. Default is false. | | ShowIcon | `bool` | - | Gets or sets whether to show icons. Default is false. | | ShowToolbar | `bool` | - | Gets or sets whether show the toolbar of tree view item. Default is false. | -| ShowToolbarCallback | `Func, Task>?` | - | A callback method that determines whether to show the toolbar of the tree view item. | | ToolbarEditLabelText | `string?` | - | Gets or sets the title of the popup-window. Default is null. | | ToolbarEditTitle | `string?` | - | Gets or sets the title of the popup-window. Default is null. | -| ToolbarTemplate | `RenderFragment?` | - | Gets or sets the toolbar content template. Default is null. | @@ -195,4 +195,4 @@ TreeViewRow component --- - + diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt index 7230f4aa1b5..c088f28e3fa 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt @@ -141,5 +141,5 @@ public bool ShowToolbar { get; set; } ``` --- -Generated: 2026-01-01 +Generated: 2026-01-02 Repository: https://github.com/dotnetcore/BootstrapBlazor/blob/main/ From 22d5c39b0f8c2323181ac08c8707ac910c7f128a Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 12:21:40 +0800 Subject: [PATCH 04/34] feat(DocsGenerator): add check for index file freshness against component sources --- tools/LlmsDocsGenerator/DocsGenerator.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index 97db6831749..bd7f7a9cbb9 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -136,6 +136,20 @@ public async Task CheckAsync() return false; } + var indexLastWrite = File.GetLastWriteTimeUtc(indexPath); + + // compute the most recent component source timestamp: + var newestComponentWrite = components + .SelectMany(c => c.SourceFiles) + .Select(File.GetLastWriteTimeUtc) + .DefaultIfEmpty(indexLastWrite) + .Max(); + + if (indexLastWrite < newestComponentWrite) + { + Console.WriteLine("Index file is stale relative to component sources. Please regenerate docs."); + return false; + } // Check each category file foreach (var category in categorized) { From ca50a4b010fcb31fba3a0524efb5631586585dcc Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 12:25:41 +0800 Subject: [PATCH 05/34] fix(typo): multiple typos fixed --- src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt | 2 +- src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt | 2 +- src/BootstrapBlazor/Components/Button/ButtonBase.cs | 2 +- src/BootstrapBlazor/Components/Button/SlideButton.razor.cs | 2 +- src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt index c6432bbf185..ea6fddd40d6 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt @@ -418,7 +418,7 @@ SlideButton 组件 | IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | | Items | `IEnumerable?` | - | 获得/设置 展开项集合 | | Offset | `float` | 8 | 获得/设置 弹窗偏移量 默认 8px | -| Placement | `Placement` | - | 获得/设置 按钮颜色 | +| Placement | `Placement` | - | 获得/设置 展开项显示位置 | | ShowHeader | `bool` | - | 获得/设置 是否显示标题 默认 false 不显示 | | Size | `Size` | - | 获得/设置 Size 大小 | | SlideButtonItems | `RenderFragment?` | - | 获得/设置 数据项模板 | diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt index 847269f5d01..07aedec21b0 100644 --- a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt +++ b/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt @@ -1020,7 +1020,7 @@ DateTimePickerCell 组件 ## DateTimeFilter -DataTime filter component +DateTime filter component ### Parameters diff --git a/src/BootstrapBlazor/Components/Button/ButtonBase.cs b/src/BootstrapBlazor/Components/Button/ButtonBase.cs index fa46a67c002..05205e4fd17 100644 --- a/src/BootstrapBlazor/Components/Button/ButtonBase.cs +++ b/src/BootstrapBlazor/Components/Button/ButtonBase.cs @@ -129,7 +129,7 @@ public abstract class ButtonBase : TooltipWrapperBase public bool IsDisabled { get; set; } /// - /// 获得/设置 点击时间是否向上传播 默认 false + /// 获得/设置 点击事件是否向上传播 默认 false /// [Parameter] public bool StopPropagation { get; set; } diff --git a/src/BootstrapBlazor/Components/Button/SlideButton.razor.cs b/src/BootstrapBlazor/Components/Button/SlideButton.razor.cs index e76c05097e9..b7133af1f7a 100644 --- a/src/BootstrapBlazor/Components/Button/SlideButton.razor.cs +++ b/src/BootstrapBlazor/Components/Button/SlideButton.razor.cs @@ -55,7 +55,7 @@ public partial class SlideButton public Color Color { get; set; } = Color.Primary; /// - /// 获得/设置 按钮颜色 + /// 获得/设置 展开项显示位置 /// [Parameter] public Placement Placement { get; set; } diff --git a/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs b/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs index ef1da901542..ad3175c6a81 100644 --- a/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs +++ b/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs @@ -6,7 +6,7 @@ namespace BootstrapBlazor.Components; /// -/// DataTime filter component +/// DateTime filter component /// public partial class DateTimeFilter { From d2704987789434587a4af9482282910ba23dee87 Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 12:28:52 +0800 Subject: [PATCH 06/34] refactor(ComponentAnalyzer): simplify GetClassName method by removing unnecessary checks --- tools/LlmsDocsGenerator/ComponentAnalyzer.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/LlmsDocsGenerator/ComponentAnalyzer.cs b/tools/LlmsDocsGenerator/ComponentAnalyzer.cs index dbb404a89a5..a157d6a1f95 100644 --- a/tools/LlmsDocsGenerator/ComponentAnalyzer.cs +++ b/tools/LlmsDocsGenerator/ComponentAnalyzer.cs @@ -135,15 +135,7 @@ public async Task> AnalyzeAllComponentsAsync() private string GetClassName(ClassDeclarationSyntax classDeclaration) { - var name = classDeclaration.Identifier.Text; - - // Remove generic part for display name - if (classDeclaration.TypeParameterList != null) - { - return name; - } - - return name; + return classDeclaration.Identifier.Text; } private string GetFullClassName(ClassDeclarationSyntax classDeclaration, SyntaxNode root) From d80739bfc126408507a7823b3602c0577d8ad697 Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 12:56:33 +0800 Subject: [PATCH 07/34] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20LlmsDocsGene?= =?UTF-8?q?rator=20=E7=9A=84=E4=B8=AD=E6=96=87=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/LlmsDocsGenerator/README.md | 193 +++++++++++++++++++++ tools/LlmsDocsGenerator/README.zh-CN.md | 214 ++++++++++++++++++++++++ 2 files changed, 407 insertions(+) create mode 100644 tools/LlmsDocsGenerator/README.md create mode 100644 tools/LlmsDocsGenerator/README.zh-CN.md diff --git a/tools/LlmsDocsGenerator/README.md b/tools/LlmsDocsGenerator/README.md new file mode 100644 index 00000000000..4f04f54ae56 --- /dev/null +++ b/tools/LlmsDocsGenerator/README.md @@ -0,0 +1,193 @@ +# LlmsDocsGenerator + +A tool that automatically generates LLM-friendly documentation for BootstrapBlazor components. + +## Purpose + +AI coding assistants (Claude Code, Cursor, GitHub Copilot) often generate incorrect UI code because they lack accurate component API information. This tool solves that problem by: + +1. **Auto-generating parameter tables** from source code using Roslyn +2. **Providing GitHub source links** for deeper reference +3. **Integrating with CI/CD** to keep docs synchronized with code + +## Architecture + +``` +┌─────────────────────────────────────────────────────────────┐ +│ LlmsDocsGenerator │ +├─────────────────────────────────────────────────────────────┤ +│ ComponentAnalyzer → Roslyn-based source code parser │ +│ MarkdownBuilder → Generates markdown documentation │ +│ DocsGenerator → Orchestrates the generation flow │ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ Output: wwwroot/llmstxt/ │ +├─────────────────────────────────────────────────────────────┤ +│ llms.txt → Index with quick start guide │ +│ llms-table.txt → Table component documentation │ +│ llms-input.txt → Input component documentation │ +│ llms-select.txt → Selection component documentation │ +│ llms-button.txt → Button component documentation │ +│ llms-dialog.txt → Dialog component documentation │ +│ llms-nav.txt → Navigation component documentation │ +│ llms-card.txt → Container component documentation │ +│ llms-treeview.txt → Tree component documentation │ +│ llms-form.txt → Form component documentation │ +│ llms-other.txt → Other component documentation │ +│ llms-example-project.txt → Template for user projects │ +└─────────────────────────────────────────────────────────────┘ +``` + +## How It Works + +### 1. Source Code Analysis + +The `ComponentAnalyzer` uses Roslyn to parse C# source files: + +```csharp +// Scans for [Parameter] attributes +var parameters = classDeclaration.DescendantNodes() + .OfType() + .Where(p => HasAttribute(p, "Parameter")); + +// Extracts XML documentation comments +var summary = ExtractXmlSummary(property); +``` + +### 2. Documentation Generation + +The `MarkdownBuilder` creates structured markdown with: + +- Parameter tables (name, type, default, description) +- Event callbacks section +- Public methods +- GitHub source links + +### 3. Component Categorization + +Components are automatically grouped into categories: + +| Category | Components | +|----------|------------| +| table | Table, SelectTable, TableToolbar | +| input | BootstrapInput, Textarea, OtpInput | +| select | Select, AutoComplete, Cascader | +| button | Button, PopConfirmButton | +| dialog | Modal, Drawer, Toast | +| nav | Menu, Tab, Breadcrumb | +| card | Card, Collapse, GroupBox | +| treeview | TreeView, Tree | +| form | ValidateForm, EditorForm | +| other | All other components | + +## Usage + +### Generate All Documentation + +```bash +dotnet run --project tools/LlmsDocsGenerator +``` + +### Generate Specific Component + +```bash +dotnet run --project tools/LlmsDocsGenerator -- --component Table +``` + +### Generate Index Only + +```bash +dotnet run --project tools/LlmsDocsGenerator -- --index-only +``` + +### Check Freshness (CI/CD) + +```bash +dotnet run --project tools/LlmsDocsGenerator -- --check +``` + +Returns exit code 1 if documentation is outdated. + +### Custom Output Directory + +```bash +dotnet run --project tools/LlmsDocsGenerator -- --output ./docs +``` + +## CI/CD Integration + +### Build Workflow (build.yml) + +Checks if documentation is up-to-date on every push to main: + +```yaml +- name: Check LLM Documentation + run: dotnet run --project tools/LlmsDocsGenerator -- --check +``` + +### Docker Workflow (docker.yml) + +Regenerates documentation before building the doc site: + +```yaml +- name: Generate LLM Documentation + run: dotnet run --project tools/LlmsDocsGenerator +``` + +### Dockerfile + +Generates documentation during container build: + +```dockerfile +WORKDIR /tools/LlmsDocsGenerator +RUN dotnet run +``` + +## Output Format + +Each component documentation includes: + +```markdown +## ComponentName + +Description from XML comments + +### Type Parameters +- `TItem` - Generic type parameter + +### Parameters +| Parameter | Type | Default | Description | +|-----------|------|---------|-------------| +| Items | `List` | - | Data source | +| ShowToolbar | `bool` | false | Show toolbar | + +### Event Callbacks +| Event | Type | Description | +|-------|------|-------------| +| OnClick | `EventCallback` | Click handler | + +### Public Methods +- `Task RefreshAsync()` - Refresh data + +### Source +- Component: [src/.../Component.razor.cs](GitHub URL) +- Examples: [src/.../Samples/Components.razor](GitHub URL) +``` + +## For Library Users + +Users can reference this documentation in their own projects by creating a `llms.txt`: + +```markdown +# My Project + +## Dependencies + +### BootstrapBlazor +- Documentation: https://www.blazor.zone/llmstxt/llms.txt +- Table: https://www.blazor.zone/llmstxt/llms-table.txt +``` + +See `llms-example-project.txt` for a complete template. diff --git a/tools/LlmsDocsGenerator/README.zh-CN.md b/tools/LlmsDocsGenerator/README.zh-CN.md new file mode 100644 index 00000000000..73b4518db28 --- /dev/null +++ b/tools/LlmsDocsGenerator/README.zh-CN.md @@ -0,0 +1,214 @@ +# LlmsDocsGenerator + +自动为 BootstrapBlazor 组件生成 LLM 友好文档的工具。 + +## 目的 + +AI 编程助手(Claude Code、Cursor、GitHub Copilot)经常因为缺乏准确的组件 API 信息而生成错误的 UI 代码。本工具通过以下方式解决这个问题: + +1. **使用 Roslyn 自动生成参数表** - 从源代码提取 +2. **提供 GitHub 源码链接** - 方便深入查阅 +3. **集成 CI/CD** - 确保文档与代码同步 + +## 架构 + +``` +┌─────────────────────────────────────────────────────────────┐ +│ LlmsDocsGenerator │ +├─────────────────────────────────────────────────────────────┤ +│ ComponentAnalyzer → 基于 Roslyn 的源码解析器 │ +│ MarkdownBuilder → 生成 Markdown 文档 │ +│ DocsGenerator → 协调生成流程 │ +└─────────────────────────────────────────────────────────────┘ + │ + ▼ +┌─────────────────────────────────────────────────────────────┐ +│ 输出目录: wwwroot/llmstxt/ │ +├─────────────────────────────────────────────────────────────┤ +│ llms.txt → 索引文件,包含快速入门指南 │ +│ llms-table.txt → 表格组件文档 │ +│ llms-input.txt → 输入组件文档 │ +│ llms-select.txt → 选择组件文档 │ +│ llms-button.txt → 按钮组件文档 │ +│ llms-dialog.txt → 对话框组件文档 │ +│ llms-nav.txt → 导航组件文档 │ +│ llms-card.txt → 容器组件文档 │ +│ llms-treeview.txt → 树形组件文档 │ +│ llms-form.txt → 表单组件文档 │ +│ llms-other.txt → 其他组件文档 │ +│ llms-example-project.txt → 用户项目模板 │ +└─────────────────────────────────────────────────────────────┘ +``` + +## 工作原理 + +### 1. 源码分析 + +`ComponentAnalyzer` 使用 Roslyn 解析 C# 源文件: + +```csharp +// 扫描 [Parameter] 特性 +var parameters = classDeclaration.DescendantNodes() + .OfType() + .Where(p => HasAttribute(p, "Parameter")); + +// 提取 XML 文档注释 +var summary = ExtractXmlSummary(property); +``` + +### 2. 文档生成 + +`MarkdownBuilder` 生成结构化的 Markdown,包含: + +- 参数表(名称、类型、默认值、描述) +- 事件回调部分 +- 公共方法 +- GitHub 源码链接 + +### 3. 组件分类 + +组件自动分组到以下类别: + +| 类别 | 组件示例 | +|------|----------| +| table | Table, SelectTable, TableToolbar | +| input | BootstrapInput, Textarea, OtpInput | +| select | Select, AutoComplete, Cascader | +| button | Button, PopConfirmButton | +| dialog | Modal, Drawer, Toast | +| nav | Menu, Tab, Breadcrumb | +| card | Card, Collapse, GroupBox | +| treeview | TreeView, Tree | +| form | ValidateForm, EditorForm | +| other | 其他所有组件 | + +## 使用方法 + +### 生成所有文档 + +```bash +dotnet run --project tools/LlmsDocsGenerator +``` + +### 生成特定组件 + +```bash +dotnet run --project tools/LlmsDocsGenerator -- --component Table +``` + +### 仅生成索引 + +```bash +dotnet run --project tools/LlmsDocsGenerator -- --index-only +``` + +### 检查文档是否过期(CI/CD) + +```bash +dotnet run --project tools/LlmsDocsGenerator -- --check +``` + +如果文档过期,返回退出码 1。 + +### 自定义输出目录 + +```bash +dotnet run --project tools/LlmsDocsGenerator -- --output ./docs +``` + +## CI/CD 集成 + +### 构建工作流 (build.yml) + +每次推送到 main 分支时检查文档是否最新: + +```yaml +- name: Check LLM Documentation + run: dotnet run --project tools/LlmsDocsGenerator -- --check +``` + +### Docker 工作流 (docker.yml) + +构建文档站点前重新生成文档: + +```yaml +- name: Generate LLM Documentation + run: dotnet run --project tools/LlmsDocsGenerator +``` + +### Dockerfile + +容器构建时生成文档: + +```dockerfile +WORKDIR /tools/LlmsDocsGenerator +RUN dotnet run +``` + +## 输出格式 + +每个组件的文档包含: + +```markdown +## 组件名称 + +来自 XML 注释的描述 + +### 类型参数 +- `TItem` - 泛型类型参数 + +### 参数 +| 参数 | 类型 | 默认值 | 描述 | +|------|------|--------|------| +| Items | `List` | - | 数据源 | +| ShowToolbar | `bool` | false | 显示工具栏 | + +### 事件回调 +| 事件 | 类型 | 描述 | +|------|------|------| +| OnClick | `EventCallback` | 点击处理器 | + +### 公共方法 +- `Task RefreshAsync()` - 刷新数据 + +### 源码 +- 组件: [src/.../Component.razor.cs](GitHub 链接) +- 示例: [src/.../Samples/Components.razor](GitHub 链接) +``` + +## 库用户使用指南 + +用户可以在自己的项目中创建 `llms.txt` 来引用本文档: + +```markdown +# 我的项目 + +## 依赖 + +### BootstrapBlazor +- 文档: https://www.blazor.zone/llmstxt/llms.txt +- 表格: https://www.blazor.zone/llmstxt/llms-table.txt +``` + +完整模板请参考 `llms-example-project.txt`。 + +## 设计理念 + +### 为什么需要这个工具? + +| 问题 | 解决方案 | +|------|----------| +| AI 生成错误的组件代码 | 提供准确的参数文档 | +| 手动维护文档容易过期 | 自动从源码生成 | +| 文档太大占用上下文 | 按类别分割,按需加载 | +| 用户不知道如何引用 | 提供项目模板 | + +### 混合文档策略 + +``` +AI 代理工作流程: +1. 读取 llms.txt (5KB) → 快速了解组件分类 +2. 按需读取 llms-{category}.txt → 获取详细参数 +3. 不确定时查阅 GitHub 源码 → 获取准确信息 +4. 参考 Samples 目录 → 学习官方用法 +``` From e1ae93a0e877b2692146acb436821391962e162a Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 16:00:26 +0800 Subject: [PATCH 08/34] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=94=B9=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=A4=B9=E5=90=8D=E7=A7=B0=E4=B8=BA=20llms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 32 +++++++++---------- .../wwwroot/{llmstxt => llms}/llms-button.txt | 0 .../wwwroot/{llmstxt => llms}/llms-card.txt | 0 .../wwwroot/{llmstxt => llms}/llms-dialog.txt | 0 .../llms-example-project.txt | 0 .../wwwroot/{llmstxt => llms}/llms-form.txt | 0 .../wwwroot/{llmstxt => llms}/llms-input.txt | 0 .../wwwroot/{llmstxt => llms}/llms-nav.txt | 0 .../wwwroot/{llmstxt => llms}/llms-other.txt | 0 .../wwwroot/{llmstxt => llms}/llms-select.txt | 0 .../wwwroot/{llmstxt => llms}/llms-table.txt | 0 .../{llmstxt => llms}/llms-treeview.txt | 0 .../wwwroot/{llmstxt => llms}/llms.txt | 0 tools/LlmsDocsGenerator/Program.cs | 6 ++-- tools/LlmsDocsGenerator/README.md | 8 ++--- tools/LlmsDocsGenerator/README.zh-CN.md | 6 ++-- 16 files changed, 26 insertions(+), 26 deletions(-) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-button.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-card.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-dialog.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-example-project.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-form.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-input.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-nav.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-other.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-select.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-table.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms-treeview.txt (100%) rename src/BootstrapBlazor.Server/wwwroot/{llmstxt => llms}/llms.txt (100%) diff --git a/README.md b/README.md index 7950f03b82d..a98c032f2fd 100644 --- a/README.md +++ b/README.md @@ -93,27 +93,27 @@ This project includes LLM-friendly documentation to help AI coding assistants (C ### Online Access -Documentation files are available at: `https://www.blazor.zone/llmstxt/` +Documentation files are available at: `https://www.blazor.zone/llms/` | File | URL | |------|-----| -| Index | https://www.blazor.zone/llmstxt/llms.txt | -| Table | https://www.blazor.zone/llmstxt/llms-table.txt | -| Input | https://www.blazor.zone/llmstxt/llms-input.txt | -| Select | https://www.blazor.zone/llmstxt/llms-select.txt | -| Button | https://www.blazor.zone/llmstxt/llms-button.txt | -| Dialog | https://www.blazor.zone/llmstxt/llms-dialog.txt | -| Nav | https://www.blazor.zone/llmstxt/llms-nav.txt | -| Card | https://www.blazor.zone/llmstxt/llms-card.txt | -| TreeView | https://www.blazor.zone/llmstxt/llms-treeview.txt | -| Form | https://www.blazor.zone/llmstxt/llms-form.txt | -| Other | https://www.blazor.zone/llmstxt/llms-other.txt | +| Index | https://www.blazor.zone/llms/llms.txt | +| Table | https://www.blazor.zone/llms/llms-table.txt | +| Input | https://www.blazor.zone/llms/llms-input.txt | +| Select | https://www.blazor.zone/llms/llms-select.txt | +| Button | https://www.blazor.zone/llms/llms-button.txt | +| Dialog | https://www.blazor.zone/llms/llms-dialog.txt | +| Nav | https://www.blazor.zone/llms/llms-nav.txt | +| Card | https://www.blazor.zone/llms/llms-card.txt | +| TreeView | https://www.blazor.zone/llms/llms-treeview.txt | +| Form | https://www.blazor.zone/llms/llms-form.txt | +| Other | https://www.blazor.zone/llms/llms-other.txt | ### Using in Your Project Create a `llms.txt` in your project root to reference BootstrapBlazor documentation. -See the full example template: https://www.blazor.zone/llmstxt/llms-example-project.txt +See the full example template: https://www.blazor.zone/llms/llms-example-project.txt Quick example: @@ -124,12 +124,12 @@ Quick example: ### BootstrapBlazor - NuGet: BootstrapBlazor -- Documentation: https://www.blazor.zone/llmstxt/llms.txt +- Documentation: https://www.blazor.zone/llms/llms.txt - Source Code: https://github.com/dotnetcore/BootstrapBlazor For component parameters and usage: -- Table: https://www.blazor.zone/llmstxt/llms-table.txt -- Dialog: https://www.blazor.zone/llmstxt/llms-dialog.txt +- Table: https://www.blazor.zone/llms/llms-table.txt +- Dialog: https://www.blazor.zone/llms/llms-dialog.txt - ... (add others as needed) ``` diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-button.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-button.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-button.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-card.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-card.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-card.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-dialog.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-dialog.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-dialog.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-example-project.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-example-project.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-example-project.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-example-project.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-form.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-form.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-form.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-input.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-input.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-input.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-nav.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-nav.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-nav.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-other.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-other.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-other.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-select.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-select.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-select.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-table.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-table.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-table.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-treeview.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms-treeview.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms-treeview.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms.txt similarity index 100% rename from src/BootstrapBlazor.Server/wwwroot/llmstxt/llms.txt rename to src/BootstrapBlazor.Server/wwwroot/llms/llms.txt diff --git a/tools/LlmsDocsGenerator/Program.cs b/tools/LlmsDocsGenerator/Program.cs index c5853fb7c7e..1fc06a78c1d 100644 --- a/tools/LlmsDocsGenerator/Program.cs +++ b/tools/LlmsDocsGenerator/Program.cs @@ -3,8 +3,8 @@ // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone -using System.CommandLine; using LlmsDocsGenerator; +using System.CommandLine; var rootCommand = new RootCommand("BootstrapBlazor LLMs Documentation Generator"); @@ -22,8 +22,8 @@ var outputOption = new Option( name: "--output", - getDefaultValue: () => "src/BootstrapBlazor.Server/wwwroot/llmstxt", - description: "Output directory for generated files (default: src/BootstrapBlazor.Server/wwwroot/llmstxt)"); + getDefaultValue: () => "src/BootstrapBlazor.Server/wwwroot/llms", + description: "Output directory for generated files (default: src/BootstrapBlazor.Server/wwwroot/llms)"); rootCommand.AddOption(componentOption); rootCommand.AddOption(indexOnlyOption); diff --git a/tools/LlmsDocsGenerator/README.md b/tools/LlmsDocsGenerator/README.md index 4f04f54ae56..2f31a91192a 100644 --- a/tools/LlmsDocsGenerator/README.md +++ b/tools/LlmsDocsGenerator/README.md @@ -14,7 +14,7 @@ AI coding assistants (Claude Code, Cursor, GitHub Copilot) often generate incorr ``` ┌─────────────────────────────────────────────────────────────┐ -│ LlmsDocsGenerator │ +│ LlmsDocsGenerator │ ├─────────────────────────────────────────────────────────────┤ │ ComponentAnalyzer → Roslyn-based source code parser │ │ MarkdownBuilder → Generates markdown documentation │ @@ -23,7 +23,7 @@ AI coding assistants (Claude Code, Cursor, GitHub Copilot) often generate incorr │ ▼ ┌─────────────────────────────────────────────────────────────┐ -│ Output: wwwroot/llmstxt/ │ +│ Output: wwwroot/llms/ │ ├─────────────────────────────────────────────────────────────┤ │ llms.txt → Index with quick start guide │ │ llms-table.txt → Table component documentation │ @@ -186,8 +186,8 @@ Users can reference this documentation in their own projects by creating a `llms ## Dependencies ### BootstrapBlazor -- Documentation: https://www.blazor.zone/llmstxt/llms.txt -- Table: https://www.blazor.zone/llmstxt/llms-table.txt +- Documentation: https://www.blazor.zone/llms/llms.txt +- Table: https://www.blazor.zone/llms/llms-table.txt ``` See `llms-example-project.txt` for a complete template. diff --git a/tools/LlmsDocsGenerator/README.zh-CN.md b/tools/LlmsDocsGenerator/README.zh-CN.md index 73b4518db28..dab13f66c7e 100644 --- a/tools/LlmsDocsGenerator/README.zh-CN.md +++ b/tools/LlmsDocsGenerator/README.zh-CN.md @@ -23,7 +23,7 @@ AI 编程助手(Claude Code、Cursor、GitHub Copilot)经常因为缺乏准 │ ▼ ┌─────────────────────────────────────────────────────────────┐ -│ 输出目录: wwwroot/llmstxt/ │ +│ 输出目录: wwwroot/llms/ │ ├─────────────────────────────────────────────────────────────┤ │ llms.txt → 索引文件,包含快速入门指南 │ │ llms-table.txt → 表格组件文档 │ @@ -186,8 +186,8 @@ RUN dotnet run ## 依赖 ### BootstrapBlazor -- 文档: https://www.blazor.zone/llmstxt/llms.txt -- 表格: https://www.blazor.zone/llmstxt/llms-table.txt +- 文档: https://www.blazor.zone/llms/llms.txt +- 表格: https://www.blazor.zone/llms/llms-table.txt ``` 完整模板请参考 `llms-example-project.txt`。 From 4cce1c4fd725838ed671ce91fe727e71d0eda28f Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 16:02:42 +0800 Subject: [PATCH 09/34] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E5=BF=BD?= =?UTF-8?q?=E7=95=A5=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 785fb1080ef..a691828f35b 100644 --- a/.gitignore +++ b/.gitignore @@ -382,3 +382,6 @@ src/**/wwwroot/**/uploader # Code Agents .claude + +# llms +**/wwwroot/llms From c44e11fd42da6c7d4122688cd0e06b1369600d12 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 16:03:20 +0800 Subject: [PATCH 10/34] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=20llms=20?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BootstrapBlazor.slnx | 1 + 1 file changed, 1 insertion(+) diff --git a/BootstrapBlazor.slnx b/BootstrapBlazor.slnx index 0e3cf95b26d..9f5de9cdc97 100644 --- a/BootstrapBlazor.slnx +++ b/BootstrapBlazor.slnx @@ -74,5 +74,6 @@ + From d05e49feea471e134806ef037e5c53fed55eb85e Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 16:04:12 +0800 Subject: [PATCH 11/34] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=20llms=20?= =?UTF-8?q?=E9=9D=99=E6=80=81=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/llms/llms-button.txt | 572 --- .../wwwroot/llms/llms-card.txt | 128 - .../wwwroot/llms/llms-dialog.txt | 408 -- .../wwwroot/llms/llms-example-project.txt | 150 - .../wwwroot/llms/llms-form.txt | 101 - .../wwwroot/llms/llms-input.txt | 265 -- .../wwwroot/llms/llms-nav.txt | 671 --- .../wwwroot/llms/llms-other.txt | 3641 ----------------- .../wwwroot/llms/llms-select.txt | 807 ---- .../wwwroot/llms/llms-table.txt | 393 -- .../wwwroot/llms/llms-treeview.txt | 198 - .../wwwroot/llms/llms.txt | 145 - 12 files changed, 7479 deletions(-) delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-button.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-card.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-dialog.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-example-project.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-form.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-input.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-nav.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-other.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-select.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-table.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms-treeview.txt delete mode 100644 src/BootstrapBlazor.Server/wwwroot/llms/llms.txt diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-button.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-button.txt deleted file mode 100644 index ea6fddd40d6..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-button.txt +++ /dev/null @@ -1,572 +0,0 @@ -# BootstrapBlazor Button Components - -> Auto-generated parameter reference for button components - -## Components - -- [Button](#button) -- [ButtonBase](#buttonbase) -- [ButtonUpload](#buttonupload) -- [DialButton](#dialbutton) -- [FilterButton](#filterbutton) -- [FullScreenButton](#fullscreenbutton) -- [GoTop](#gotop) -- [NavbarToggleButton](#navbartogglebutton) -- [PopConfirmButton](#popconfirmbutton) -- [PopConfirmButtonBase](#popconfirmbuttonbase) -- [PopConfirmButtonContent](#popconfirmbuttoncontent) -- [PrintButton](#printbutton) -- [PulseButton](#pulsebutton) -- [SlideButton](#slidebutton) -- [SwitchButton](#switchbutton) -- [TabToolbarButton](#tabtoolbarbutton) -- [ToggleButton](#togglebutton) -- [ToolbarButtonGroup](#toolbarbuttongroup) -- [TreeViewToolbarEditButton](#treeviewtoolbareditbutton) - -## Button - -Button 按钮组件 - -**Inherits from**: `ButtonBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsAutoFocus | `bool` | - | 获得/设置 是否自动获取焦点 默认 false 不自动获取焦点 | - - - -### Public Methods - -- `ValueTask FocusAsync()` - - 自动获得焦点方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/Button.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/Button.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Buttons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor) - -## ButtonBase - -Button 按钮组件 - -**Inherits from**: `TooltipWrapperBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ButtonStyle | `ButtonStyle` | - | 获得/设置 按钮风格枚举 | -| ButtonType | `ButtonType` | ButtonType.Button | 获得/设置 按钮类型 Submit 为表单提交按钮 Reset 为表单重置按钮 默认为 Button | -| ChildContent | `RenderFragment?` | - | 获得/设置 RenderFragment 实例 | -| Color | `Color` | Color.Primary | 获得/设置 按钮颜色 默认 | -| Icon | `string?` | - | 获得/设置 显示图标 | -| IsAsync | `bool` | - | 获得/设置 是否为异步按钮,默认为 false 如果为 true 表示是异步按钮,点击按钮后禁用自身并且等待异步完成,过程中显示 loading 动画 | -| IsBlock | `bool` | - | 获得/设置 Block 模式 | -| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | -| IsKeepDisabled | `bool` | - | 获得/设置 是否异步结束后是否保持禁用状态,默认为 false | -| IsOutline | `bool` | - | 获得/设置 Outline 样式 默认 false | -| LoadingIcon | `string?` | - | 获得/设置 正在加载动画图标 默认为 fa-solid fa-spin fa-spinner | -| OnClickWithoutRender | `Func?` | - | 获得/设置 OnClick 事件不刷新父组件 | -| Size | `Size` | - | 获得/设置 Size 大小 | -| StopPropagation | `bool` | - | 获得/设置 点击时间是否向上传播 默认 false | -| Text | `string?` | - | 获得/设置 显示文字 | -| OnClick | `EventCallback` | - | 获得/设置 OnClick 事件 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| OnClick | `EventCallback` | 获得/设置 OnClick 事件 | - -### Public Methods - -- `Task RemoveTooltip()` - - 销毁 Tooltip 方法 -- `void SetDisable(bool disable)` - - 设置按钮是否可用状态 -- `Task ShowTooltip()` - - 显示 Tooltip 方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/ButtonBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/ButtonBase.cs) - -## ButtonUpload - -按钮上传组件 ButtonUpload Component - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BrowserButtonClass | `string?` | - | 获得/设置 上传按钮样式 默认 null 使用 Button 默认 Color Primary | -| BrowserButtonColor | `Color` | Color.Primary | 获得/设置 浏览按钮颜色 | -| BrowserButtonIcon | `string?` | - | 获得/设置 浏览按钮图标 | -| BrowserButtonText | `string?` | - | 获得/设置 浏览按钮显示文字 | -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件内容 | -| InvalidStatusIcon | `string?` | - | 获得/设置 上传失败状态图标 | -| LoadingIcon | `string?` | - | 获得/设置 浏览按钮加载中图标 | -| OnGetFileFormat | `Func?` | - | 获得/设置 设置文件格式图标回调委托 | -| ShowUploadFileList | `bool` | true | 获得/设置 是否显示上传列表 默认 true | -| Size | `Size` | - | 获得/设置 Size 大小 | -| ValidStatusIcon | `string?` | - | 获得/设置 上传成功状态图标 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Upload/ButtonUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/ButtonUpload.razor.cs) - -## DialButton - -拨号按钮组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ButtonTemplate | `RenderFragment?` | - | 按钮模板 | -| ChildContent | `RenderFragment?` | - | 数据项模板 | -| Color | `Color` | Color.Primary | 获得/设置 按钮颜色 | -| DialMode | `DialMode` | - | 获得/设置 呈现方式 默认为 直线 | -| Duration | `int` | 400 | 获得/设置 动画延时 默认 400 单位 ms 毫秒 | -| Icon | `string?` | - | 获得/设置 显示图标 | -| IsAutoClose | `bool` | true | 获得/设置 是否自动关闭弹窗 默认为 true | -| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | -| Items | `IEnumerable?` | - | 展开项集合 | -| ItemTemplate | `RenderFragment?` | - | 展开部分模板 | -| Offset | `float` | 8 | 获得/设置 弹窗便宜量 默认 8px | -| Placement | `Placement` | - | 获得/设置 位置 | -| Radius | `int` | 75 | 获得/设置 时扇形分布半径值 默认 75; | -| Size | `Size` | - | 获得/设置 Size 大小 | -| OnClick | `EventCallback` | - | 获得/设置 OnClick 事件 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| OnClick | `EventCallback` | 获得/设置 OnClick 事件 | - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/DialButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/DialButton.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/DialButtons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/DialButtons.razor) - -## FilterButton - -FilterButton 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `Dropdown` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ClearIcon | `string?` | - | 获得/设置 重置按钮图标 | -| FilterIcon | `string?` | - | 获得/设置 过滤按钮图标 | -| OnClearFilter | `Func?` | - | 获得/设置 清除过滤条件时的回调方法 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/FilterButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/FilterButton.razor.cs) - -## FullScreenButton - -FullScreenButton 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| FullScreenExitIcon | `string?` | - | 获得/设置 退出全屏图标 默认 fa-solid fa-compress | -| TargetId | `string?` | - | 获得/设置 全屏元素 Id 默认为 null | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/FullScreen/FullScreenButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/FullScreen/FullScreenButton.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/FullScreenButtons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/FullScreenButtons.razor) - -## GoTop - -GoTop 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Icon | `string?` | - | 获得/设置 返回顶端 Icon 属性 | -| ScrollBehavior | `ScrollIntoViewBehavior` | - | 获得/设置 滚动行为 默认 ScrollIntoViewBehavior.Smooth | -| Target | `string?` | - | 获得/设置 滚动条所在组件 | -| TooltipText | `string?` | - | 获得/设置 鼠标悬停提示文字信息 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/GoTop/GoTop.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/GoTop/GoTop.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/GoTops.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/GoTops.razor) - -## NavbarToggleButton - -NavbarToggleButton 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | -| Target | `string?` | - | 获得/设置 联动组件选择器 默认 null | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Navbar/NavbarToggleButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarToggleButton.razor.cs) - -## PopConfirmButton - -PopConfirmButton 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Color | `Color` | Color.None | 获得/设置 按钮颜色 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/PopConfirmButton.razor.cs) - -## PopConfirmButtonBase - -确认弹窗按钮组件 - -**Inherits from**: `ButtonBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 自定义内容 | -| CloseButtonColor | `Color` | Color.Secondary | 获得/设置 确认按钮颜色 | -| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮显示图标 | -| CloseButtonText | `string?` | - | 获得/设置 关闭按钮显示文字 默认为 关闭 | -| ConfirmButtonColor | `Color` | Color.Primary | 获得/设置 确认按钮颜色 | -| ConfirmButtonIcon | `string?` | - | 获得/设置 确认按钮显示图标 | -| ConfirmButtonText | `string?` | - | 获得/设置 确认按钮显示文字 默认为 确定 | -| ConfirmIcon | `string?` | - | 获得/设置 确认框图标 | -| Content | `string?` | - | 获得/设置 显示文字 | -| CustomClass | `string?` | - | 获得/设置 自定义样式 默认 null | -| IsLink | `bool` | - | 获得/设置 是否为 A 标签 默认 false 使用 button 渲染 | -| OnBeforeClick | `Func>?` | - | 获得/设置 点击确认弹窗前回调方法 返回真时弹出弹窗 返回假时不弹出 默认 null | -| OnClose | `Func?` | - | 获得/设置 点击关闭时回调方法 | -| OnConfirm | `Func?` | - | 获得/设置 点击确认时回调方法 | -| Placement | `Placement` | - | 获得/设置 弹窗显示位置 默认 | -| ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 | -| ShowConfirmButton | `bool` | true | 获得/设置 是否显示确认按钮 | -| ShowShadow | `bool` | true | 获得/设置 是否显示阴影 默认 true | -| Title | `string?` | - | 获得/设置 显示标题 | -| Trigger | `string?` | - | 获得/设置 弹窗触发方式 默认 click 可设置 hover focus | - - - -### Public Methods - -- `Task TriggerCloseCallback()` - - Trigger OnClose event callback. - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs) - -## PopConfirmButtonContent - -Popover Confirm 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 自定义组件 | -| CloseButtonColor | `Color` | Color.Secondary | 获得/设置 确认按钮颜色 | -| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮显示图标 | -| CloseButtonText | `string?` | - | 获得/设置 关闭按钮显示文字 | -| ConfirmButtonColor | `Color` | Color.Primary | 获得/设置 确认按钮颜色 | -| ConfirmButtonIcon | `string?` | - | 获得/设置 确认按钮显示图标 | -| ConfirmButtonText | `string?` | - | 获得/设置 确认按钮显示文字 | -| Content | `string?` | - | 获得/设置 显示文字 | -| Icon | `string?` | - | 获得/设置 确认框图标 | -| OnClose | `Func?` | - | 获得/设置 确认按钮回调方法 | -| OnConfirm | `Func?` | - | 获得/设置 确认按钮回调方法 | -| ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 | -| ShowConfirmButton | `bool` | true | 获得/设置 是否显示确认按钮 | -| Title | `string?` | - | 获得/设置 显示标题 | - - - -### Public Methods - -- `Task OnCloseClick()` - - 点击关闭按钮调用此方法 -- `Task OnConfirmClick()` - - 点击确认按钮调用此方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/PopConfirmButtonContent.razor.cs) - -## PrintButton - -PrintButton 打印按钮 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| PreviewUrl | `string?` | - | 获得/设置 预览模板地址 默认为空 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Print/PrintButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Print/PrintButton.razor.cs) - -## PulseButton - -PulseButton 按钮组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ImageUrl | `string?` | - | 获得/设置 显示图片地址 默认为 null | -| PulseColor | `Color` | Color.Warning | 获得/设置 心跳环颜色 默认 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/PulseButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/PulseButton.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/PulseButtons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/PulseButtons.razor) - -## SlideButton - -SlideButton 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 展开部分模板 | -| ButtonItemTemplate | `RenderFragment?` | - | 获得/设置 展开按钮项模板 | -| ButtonTemplate | `RenderFragment?` | - | 获得/设置 按钮模板 | -| Color | `Color` | Color.Primary | 获得/设置 按钮颜色 | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 Header 部分模板 | -| HeaderText | `string?` | - | 获得/设置 展开项 Header 文本 | -| Icon | `string?` | - | 获得/设置 显示图标 | -| IsAutoClose | `bool` | true | 获得/设置 是否自动关闭弹窗 默认为 true | -| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | -| Items | `IEnumerable?` | - | 获得/设置 展开项集合 | -| Offset | `float` | 8 | 获得/设置 弹窗偏移量 默认 8px | -| Placement | `Placement` | - | 获得/设置 展开项显示位置 | -| ShowHeader | `bool` | - | 获得/设置 是否显示标题 默认 false 不显示 | -| Size | `Size` | - | 获得/设置 Size 大小 | -| SlideButtonItems | `RenderFragment?` | - | 获得/设置 数据项模板 | -| Text | `string?` | - | 获得/设置 显示文本 | -| OnClick | `EventCallback` | - | 获得/设置 OnClick 事件 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| OnClick | `EventCallback` | 获得/设置 OnClick 事件 | - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/SlideButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/SlideButton.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/SlideButtons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SlideButtons.razor) - -## SwitchButton - -Switch Button - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| OffText | `string?` | - | 获得/设置 Off 状态显示文字 | -| OnText | `string?` | - | 获得/设置 On 状态显示文字 | -| ToggleState | `bool` | - | 获得/设置 当前状态 | -| OnClick | `EventCallback` | - | 点击回调方法 | -| ToggleStateChanged | `EventCallback` | - | 状态切换回调方法 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| OnClick | `EventCallback` | 点击回调方法 | -| ToggleStateChanged | `EventCallback` | 状态切换回调方法 | - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/SwitchButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/SwitchButton.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/SwitchButtons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SwitchButtons.razor) - -## TabToolbarButton - -TabToolbarButton component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Icon | `string?` | - | Gets or sets the button icon string. Default is null. | -| OnClickAsync | `Func?` | - | Gets or sets the button click event handler. Default is null. | -| TooltipText | `string?` | - | Gets or sets the tooltip text. Default is null. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Tab/TabToolbarButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tab/TabToolbarButton.razor.cs) - -## ToggleButton - -Toggle Button 按钮组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsActive | `bool` | - | 获得/设置 当前状态是否为激活状态 默认 false | -| OnToggleAsync | `Func?` | - | 获得/设置 状态切换回调方法 | -| IsActiveChanged | `EventCallback` | - | 获得/设置 激活状态回调方法 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| IsActiveChanged | `EventCallback` | 获得/设置 激活状态回调方法 | - -### Source - -- Component: [src/BootstrapBlazor/Components/Button/ToggleButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Button/ToggleButton.razor.cs) - -## ToolbarButtonGroup - -ToolbarGroup 组件用于在工具栏中添加一组按钮 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Toolbar/ToolbarButtonGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toolbar/ToolbarButtonGroup.razor.cs) - -## TreeViewToolbarEditButton - -TreeViewToolbarEditButton component - -### Type Parameters - -- `TItem` - Generic type parameter - -**Inherits from**: `ComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Icon | `string?` | - | Gets or sets the icon of the edit button. Default is null. | -| Item | `TreeViewItem?` | - | Gets or sets the tree view item. Default is null. | -| OnUpdateCallbackAsync | `Func>?` | - | Gets or sets the update the tree text value callback. Default is null. If return true will update the tree text value, otherwise will not update. | -| Text | `string?` | - | Gets or sets the text of the popup-window label. Default is null. | -| Title | `string?` | - | Gets or sets the title of the popup-window. Default is null. | -| ItemChanged | `EventCallback>` | - | Gets or sets the item changed event callback. | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ItemChanged | `EventCallback>` | Gets or sets the item changed event callback. | - -### Source - -- Component: [src/BootstrapBlazor/Components/TreeView/TreeViewToolbarEditButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/TreeView/TreeViewToolbarEditButton.razor.cs) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-card.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-card.txt deleted file mode 100644 index 18cc3abf3b6..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-card.txt +++ /dev/null @@ -1,128 +0,0 @@ -# BootstrapBlazor Container Components - -> Auto-generated parameter reference for card components - -## Components - -- [Card](#card) -- [CardUpload](#cardupload) -- [Collapse](#collapse) -- [GroupBox](#groupbox) - -## Card - -Card 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 BodyTemplate 模板 | -| Collapsed | `bool` | - | 获得/设置 是否收缩 默认 false 展开 | -| CollapseIcon | `string?` | - | 获得/设置 收缩展开箭头图标 默认 fa-solid fa-circle-chevron-right | -| Color | `Color` | - | 获得/设置 Card 颜色 | -| FooterTemplate | `RenderFragment?` | - | 获得/设置 FooterTemplate 模板 | -| HeaderPaddingY | `string?` | - | 获得/设置 Card Header 高度 padding Y轴值 默认 null 单位需自行给定 如 0.25rem | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 CardHeard 模板 | -| HeaderText | `string?` | - | 获得/设置 HeaderTemplate 显示文本 | -| IsCenter | `bool` | - | 获得/设置 是否居中 默认 false | -| IsCollapsible | `bool` | - | 获得/设置 是否可收缩 默认 false | -| IsShadow | `bool` | - | 获得/设置 是否显示阴影 默认 false | -| CollapsedChanged | `EventCallback` | - | 获得/设置 是否收缩 默认 false 展开 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| CollapsedChanged | `EventCallback` | 获得/设置 是否收缩 默认 false 展开 | - -### Public Methods - -- `Task ToggleCollapse(bool collapsed)` - - The callback click collapse button - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Card/Card.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Card/Card.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Cards.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Cards.razor) - -## CardUpload - -CardUpload component - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ActionButtonTemplate | `RenderFragment?` | - | 获得/设置 操作按钮模板 | -| AddIcon | `string?` | - | 获得/设置 新建图标 | -| AllowExtensions | `List?` | - | 获得/设置 图标文件扩展名集合 ".png" | -| BeforeActionButtonTemplate | `RenderFragment?` | - | 获得/设置 操作按钮模板 | -| CanPreviewCallback | `Func?` | - | 获得/设置 是否允许预览回调方法 默认 null | -| IconTemplate | `RenderFragment?` | - | 获得/设置 图标模板 | -| IsUploadButtonAtFirst | `bool` | - | 获得/设置 继续上传按钮是否在列表前 默认 false | -| OnZoomAsync | `Func?` | - | 获得/设置 点击 Zoom 图标回调方法 | -| RemoveIcon | `string?` | - | 获得/设置 移除图标 | -| ShowFileSize | `bool` | true | 获得/设置 是否显示文件尺寸,默认为 true 显示 | -| ShowZoomButton | `bool` | true | 获得/设置 是否显示放大按钮 默认 true | -| StatusIcon | `string?` | - | 获得/设置 状态图标 | -| ZoomIcon | `string?` | - | 获得/设置 放大图标 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Upload/CardUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/CardUpload.razor.cs) - -## Collapse - -Collapse 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CollapseItems | `RenderFragment?` | - | 获得/设置 CollapseItems 模板 | -| IsAccordion | `bool` | - | 获得/设置 是否为手风琴效果 默认为 false | -| OnCollapseChanged | `Func?` | - | 获得/设置 CollapseItem 展开收缩时回调方法 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Collapse/Collapse.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Collapse/Collapse.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Collapses.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Collapses.razor) - -## GroupBox - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| Title | `string?` | - | 获得/设置 Title 属性 默认为 null | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/GroupBox/GroupBox.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/GroupBox/GroupBox.razor.cs) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-dialog.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-dialog.txt deleted file mode 100644 index 8388a94754c..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-dialog.txt +++ /dev/null @@ -1,408 +0,0 @@ -# BootstrapBlazor Dialog & Feedback Components - -> Auto-generated parameter reference for dialog components - -## Components - -- [DialogBase](#dialogbase) -- [Drawer](#drawer) -- [EditDialog](#editdialog) -- [IconDialog](#icondialog) -- [Message](#message) -- [Modal](#modal) -- [ModalDialog](#modaldialog) -- [ResultDialogFooter](#resultdialogfooter) -- [SearchDialog](#searchdialog) -- [Toast](#toast) -- [ToastContainer](#toastcontainer) - -## DialogBase - -Dialog 组件基类 - -### Type Parameters - -- `TModel` - Generic type parameter - -**Inherits from**: `BootstrapModuleComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 BodyTemplate 实例 | -| Items | `IEnumerable?` | - | 获得 数据项集合 | -| ItemsPerRow | `int?` | - | 获得/设置 每行显示组件数量 默认为 null | -| LabelAlign | `Alignment` | - | 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 | -| Model | `TModel?` | - | 获得/设置 EditModel 实例 | -| RowType | `RowType` | - | 获得/设置 设置行格式 默认 Row 布局 | -| ShowLabel | `bool` | - | 获得/设置 是否显示标签 | -| ShowUnsetGroupItemsOnTop | `bool` | - | 获得/设置 未分组编辑项布局位置 默认 false 在尾部 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Dialog/DialogBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/DialogBase.cs) - -## Drawer - -Drawer component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AllowResize | `bool` | - | 获得/设置 是否允许调整大小 默认 false | -| BodyContext | `object?` | - | 获得/设置 抽屉内容相关数据 多用于传值 | -| BodyScroll | `bool` | - | 获得/设置 抽屉显示时是否允许滚动 body 默认为 false 不滚动 | -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| Height | `string` | "290px" | 获得/设置 抽屉高度 上下布局时生效 | -| IsBackdrop | `bool` | - | 获得/设置 点击遮罩是否关闭抽屉 默认为 false | -| IsKeyboard | `bool` | - | 获得/设置 是否支持键盘 ESC 关闭当前弹窗 默认 false | -| IsOpen | `bool` | - | 获得/设置 抽屉是否打开 默认 false 未打开 | -| OnClickBackdrop | `Func?` | - | 获得/设置 点击背景遮罩时回调委托方法 默认为 null | -| OnCloseAsync | `Func?` | - | 获得/设置 关闭抽屉回调委托 默认 null | -| Placement | `Placement` | Placement.Left | 获得/设置 组件出现位置 默认显示在 Left 位置 | -| Position | `string?` | - | 获得/设置 组件定位位置 默认 null 未设置 使用样式内置定位 fixed 可更改为 absolute | -| ShowBackdrop | `bool` | true | 获得/设置 是否显示遮罩 默认为 true 显示遮罩 | -| Width | `string` | "360px" | 获得/设置 抽屉宽度 左右布局时生效 | -| ZIndex | `int?` | - | 获得/设置 z-index 参数值 默认 null 未设置 | -| IsOpenChanged | `EventCallback` | - | 获得/设置 IsOpen 属性改变时回调委托方法 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| IsOpenChanged | `EventCallback` | 获得/设置 IsOpen 属性改变时回调委托方法 | - -### Public Methods - -- `Task Close()` - - 关闭抽屉方法 - - *[JSInvokable]* -- `Task OnContainerClick()` - - 点击背景遮罩方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Drawer/Drawer.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Drawers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Drawers.razor) - -## EditDialog - -编辑弹窗组件 - -### Type Parameters - -- `TModel` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 | -| CloseButtonText | `string?` | - | 获得/设置 获得/设置 重置按钮文本 | -| DisableAutoSubmitFormByEnter | `bool?` | - | 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 | -| FooterTemplate | `RenderFragment?` | - | 获得/设置 DialogFooterTemplate 实例 | -| IsTracking | `bool` | - | 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false | -| ItemChangedType | `ItemChangedType` | - | 获得/设置 实体类编辑模式 Add 还是 Update | -| OnCloseAsync | `Func?` | - | 获得/设置 关闭弹窗回调方法 | -| OnSaveAsync | `Func>?` | - | 获得/设置 保存回调委托 返回 false 时保持编辑弹窗 返回 true 时关闭编辑弹窗 | -| SaveButtonIcon | `string?` | - | 获得/设置 保存按钮图标 | -| SaveButtonText | `string?` | - | 获得/设置 保存按钮文本 | -| ShowLoading | `bool` | - | 获得/设置 查询时是否显示正在加载中动画 默认为 false | - - - -### Public Methods - -- `ValueTask ToggleLoading(bool state)` - - 显示/隐藏 Loading 遮罩 - -### Source - -- Component: [src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/EditDialog.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/EditDialogs.razor) - -## IconDialog - -IconDialog Component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ButtonText | `string?` | - | 获得/设置 拷贝按钮显示文字 | -| CopiedTooltipText | `string?` | - | 获得/设置 拷贝成功提示文字 | -| IconName | `string?` | - | 获得/设置 Icon 名称 | -| LabelFullText | `string?` | - | 获得/设置 Label 显示文字 | -| LabelText | `string?` | - | 获得/设置 Label 显示文字 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Dialog/IconDialog.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/IconDialog.razor.cs) - -## Message - -Message 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Placement | `Placement` | Placement.Top | 获得/设置 显示位置 默认为 Top | - - - -### Public Methods - -- `void Clear(string id)` - - 清除 Message 方法 由 JSInvoke 触发 - - *[JSInvokable]* -- `ValueTask Dismiss(string id)` - - OnDismiss 回调方法 由 JSInvoke 触发 - - *[JSInvokable]* -- `void SetPlacement(Placement placement)` - - 设置 容器位置方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Message/Message.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Message/Message.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Messages.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Messages.razor) - -## Modal - -Modal component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | Gets or sets the child component | -| FirstAfterRenderCallbackAsync | `Func?` | - | Gets or sets the callback method when the component has finished rendering | -| IsBackdrop | `bool` | - | Gets or sets whether to close the popup in the background, default is false | -| IsFade | `bool?` | - | Gets or sets whether to enable fade in and out animation, default is null | -| IsKeyboard | `bool` | true | Gets or sets whether to enable keyboard support, default is true to respond to the ESC key | -| OnCloseAsync | `Func?` | - | Gets or sets the callback delegate when the popup is closed | -| OnShownAsync | `Func?` | - | Gets or sets the callback method when the popup is shown | - - - -### Public Methods - -- `Task Close()` - - Method to close the current popup -- `Task CloseCallback()` - - Callback method when the popup has been closed, called by JSInvoke - - *[JSInvokable]* -- `void RegisterShownCallback(IComponent component, Func value)` - - Registers a callback method to be called after the popup is shown, equivalent to setting the OnShownAsync parameter -- `void SetHeaderText(string text)` - - Method to set the header text -- `Task Show()` - - Method to show the popup -- `Task ShownCallback()` - - Callback method when the popup has been shown, called by JSInvoke - - *[JSInvokable]* -- `Task Toggle()` - - Method to toggle the popup state -- `void UnRegisterShownCallback(IComponent component)` - - Unregisters the callback method to be called after the popup is shown - -### Source - -- Component: [src/BootstrapBlazor/Components/Modal/Modal.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Modal/Modal.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Modals.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Modals.razor) - -## ModalDialog - -ModalDialog 组件 - -**Inherits from**: `IHandlerException` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BodyContext | `object?` | - | 获得/设置 弹窗内容相关数据 多用于传值 | -| BodyTemplate | `RenderFragment?` | - | 获得/设置 ModalBody 组件 | -| Class | `string?` | - | 获得/设置 弹窗自定义样式 | -| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮显示图标 未设置时 使用 fa-solid fa-fw fa-xmark | -| CloseButtonText | `string?` | - | 获得/设置 关闭按钮显示文字 资源文件设置为 关闭 | -| ExportPdfButtonOptions | `ExportPdfButtonOptions?` | - | 获得/设置 导出 Pdf 按钮配置项 | -| FooterContentTemplate | `RenderFragment?` | - | Gets or sets the footer content template. Default is null. | -| FooterTemplate | `RenderFragment?` | - | 获得/设置 ModalFooter 组件 | -| FullScreenSize | `FullScreenSize` | - | 获得/设置 弹窗大小 默认为 | -| GetResultDialog | `Func?` | - | 获得/设置 获得模态弹窗方法 默认 null | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 ModalHeader 组件 | -| HeaderToolbarTemplate | `RenderFragment?` | - | 获得/设置 Header 中按钮模板 | -| IsAutoCloseAfterSave | `bool` | true | 获得/设置 保存成功后是否自动关闭弹窗 默认 true 自动关闭 | -| IsCentered | `bool` | true | 获得/设置 是否垂直居中 默认为 true | -| IsDraggable | `bool` | - | 获得/设置 是否可以拖拽弹窗 默认 false 不可以拖动 | -| IsHidePreviousDialog | `bool` | - | Gets or sets whether to hide the previous dialog when opening a new one, default is false | -| IsScrolling | `bool` | - | 获得/设置 是否弹窗正文超长时滚动 默认为 false | -| MaximizeWindowIcon | `string?` | - | 获得/设置 最大化按钮图标 | -| OnSaveAsync | `Func>?` | - | 获得/设置 保存按钮回调委托 返回 true 并且设置 true 时自动关闭弹窗 | -| PrintButtonColor | `Color` | Color.Primary | 获得/设置 打印按钮颜色 默认 Color.Primary | -| PrintButtonIcon | `string?` | - | 获得/设置 打印按钮图标 未设置 取当前图标主题下打印图标 | -| PrintButtonText | `string?` | - | 获得/设置 Header 中打印按钮显示文字 默认为资源文件中 打印 | -| RestoreWindowIcon | `string?` | - | 获得/设置 恢复按钮图标 | -| ResultTask | `TaskCompletionSource?` | - | 获得/设置 模态弹窗任务 实例 默认 null | -| SaveButtonIcon | `string?` | - | 获得/设置 保存按钮显示图标 未设置时 使用主题图标 | -| SaveButtonText | `string?` | - | 获得/设置 保存按钮显示文字 资源文件设置为 保存 | -| ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 默认为 true 显示 | -| ShowExportPdfButton | `bool` | - | 获得/设置 是否显示导出 Pdf 按钮 默认为 false 不显示 | -| ShowExportPdfButtonInHeader | `bool` | - | 获得/设置 Header 中是否显示导出 Pdf 按钮 默认 false 不显示 | -| ShowFooter | `bool` | true | 获得/设置 是否显示 Footer 默认为 true | -| ShowHeader | `bool` | true | 获得/设置 是否显示 Header 默认为 true | -| ShowHeaderCloseButton | `bool` | true | 获得/设置 是否显示 Header 关闭按钮 | -| ShowMaximizeButton | `bool` | - | 获得/设置 是否显示最大化按钮 默认为 false | -| ShowPrintButton | `bool` | - | 获得/设置 是否显示打印按钮 默认为 false 不显示 | -| ShowPrintButtonInHeader | `bool` | - | 获得/设置 Header 中是否显示打印按钮 默认 false 不显示 | -| ShowResize | `bool` | - | 获得/设置 是否可以 Resize 弹窗 默认 false | -| ShowSaveButton | `bool` | - | 获得/设置 是否显示保存按钮 默认为 false 不显示 | -| Size | `Size` | Size.ExtraExtraLarge | 获得/设置 弹窗大小 默认为 | -| Title | `string?` | - | 获得/设置 弹窗标题 | - - - -### Public Methods - -- `Task HandlerException(Exception ex, RenderFragment errorContent)` - - -- `void SetHeaderText(string text)` - - 设置 Header 文字方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Modal/ModalDialog.razor.cs) - -## ResultDialogFooter - -ResultDialog 对话框类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ButtonNoColor | `Color` | Color.Danger | 取消按钮颜色 | -| ButtonNoIcon | `string?` | - | 取消按钮图标 | -| ButtonNoText | `string?` | - | 取消按钮文本 | -| ButtonYesColor | `Color` | Color.Primary | 确认按钮颜色 | -| ButtonYesIcon | `string?` | - | 确认按钮图标 | -| ButtonYesText | `string?` | - | 确认按钮文本 | -| ShowNoButton | `bool` | true | 显示取消按钮 | -| ShowYesButton | `bool` | true | 显示确认按钮 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Dialog/ResultDialogFooter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/ResultDialogFooter.razor.cs) - -## SearchDialog - -查询弹窗组件 - -### Type Parameters - -- `TModel` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ClearIcon | `string?` | - | 获得/设置 清空按钮图标 | -| OnResetSearchClick | `Func?` | - | 获得/设置 重置回调委托 | -| OnSearchClick | `Func?` | - | 获得/设置 搜索回调委托 | -| QueryButtonText | `string?` | - | 获得/设置 查询按钮文本 | -| ResetButtonText | `string?` | - | 获得/设置 重置按钮文本 | -| SearchIcon | `string?` | - | 获得/设置 搜索按钮图标 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Dialog/SearchDialog.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dialog/SearchDialog.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/SearchDialogs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SearchDialogs.razor) - -## Toast - -ToastBox 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Options | `ToastOption?` | - | 获得/设置 ToastOption 实例 **[Required]** | - - - -### Public Methods - -- `Task Close()` - - 清除 ToastBox 方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Toast/Toast.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toast/Toast.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Toasts.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Toasts.razor) - -## ToastContainer - -Toast 弹出窗组件 - -**Inherits from**: `IDisposable` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Placement | `Placement` | - | 获得/设置 显示文字 | - - - -### Public Methods - -- `Task Close(ToastOption option)` - - 关闭弹窗 -- `void Dispose()` - - Dispose 方法 -- `void SetPlacement(Placement placement)` - - 设置 Toast 容器位置方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Toast/ToastContainer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toast/ToastContainer.razor.cs) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-example-project.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-example-project.txt deleted file mode 100644 index ad392d8efff..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-example-project.txt +++ /dev/null @@ -1,150 +0,0 @@ -# Example: Using BootstrapBlazor LLM Documentation in Your Project - -This file demonstrates how to create a `llms.txt` for your own project that references BootstrapBlazor documentation. - -## How to Use - -1. Copy the template below to your project root as `llms.txt` -2. Customize the project name and description -3. Add or remove component references based on what you use -4. AI Code Agents will read this file to understand your project's dependencies - ---- - -## Template (copy below this line) - -```markdown -# MyProject - -> Brief description of your project - -## Tech Stack - -- .NET 8.0 -- Blazor Server/WebAssembly -- BootstrapBlazor UI Library - -## Dependencies - -### BootstrapBlazor - -Enterprise-class Blazor UI component library based on Bootstrap 5. - -- NuGet: `dotnet add package BootstrapBlazor` -- Official Site: https://www.blazor.zone -- GitHub: https://github.com/dotnetcore/BootstrapBlazor - -#### Component Documentation - -For accurate component parameters and usage, refer to these files: - -| Category | Documentation URL | -|----------|-------------------| -| Index | https://www.blazor.zone/llmstxt/llms.txt | -| Table | https://www.blazor.zone/llmstxt/llms-table.txt | -| Input | https://www.blazor.zone/llmstxt/llms-input.txt | -| Select | https://www.blazor.zone/llmstxt/llms-select.txt | -| Button | https://www.blazor.zone/llmstxt/llms-button.txt | -| Dialog | https://www.blazor.zone/llmstxt/llms-dialog.txt | -| Nav | https://www.blazor.zone/llmstxt/llms-nav.txt | -| Card | https://www.blazor.zone/llmstxt/llms-card.txt | -| TreeView | https://www.blazor.zone/llmstxt/llms-treeview.txt | -| Form | https://www.blazor.zone/llmstxt/llms-form.txt | -| Other | https://www.blazor.zone/llmstxt/llms-other.txt | - -#### Quick Start - -```csharp -// Program.cs -builder.Services.AddBootstrapBlazor(); -``` - -```razor -@* _Imports.razor *@ -@using BootstrapBlazor.Components -``` - -```html - - - -``` - -#### Common Components Used in This Project - - -- Table: Data display with sorting, filtering, paging -- ValidateForm: Form validation -- Modal/Dialog: Popup dialogs -- Toast: Notifications -- Menu: Navigation - -## Project Structure - -``` -src/ -├── Components/ # Blazor components -├── Pages/ # Page components -├── Services/ # Business logic -└── Models/ # Data models -``` - -## Coding Conventions - -- Use BootstrapBlazor components for all UI elements -- Follow component documentation for correct parameter usage -- Use ValidateForm for all form submissions -- Use DialogService for modal dialogs -``` - ---- - -## Notes for AI Code Agents - -When generating code for projects using BootstrapBlazor: - -1. **Always fetch the documentation** before generating component code -2. **Check parameter names and types** - they may differ from other UI libraries -3. **Use the correct event callbacks** - BootstrapBlazor uses specific callback patterns -4. **Refer to source code** when documentation is insufficient - GitHub links are provided - -## Example Usage Patterns - -### Table with CRUD - -```razor - - - - - -
-``` - -### Form Validation - -```razor - - - - - -``` - -### Dialog Service - -```csharp -await DialogService.Show(new DialogOption() -{ - Title = "Confirm", - BodyTemplate = builder => builder.AddContent(0, "Are you sure?"), - OnCloseAsync = async () => { /* handle close */ } -}); -``` diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-form.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-form.txt deleted file mode 100644 index a6cff035b64..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-form.txt +++ /dev/null @@ -1,101 +0,0 @@ -# BootstrapBlazor Form Components - -> Auto-generated parameter reference for form components - -## Components - -- [EditorForm](#editorform) -- [ValidateForm](#validateform) - -## EditorForm - -编辑表单基类 - -### Type Parameters - -- `TModel` - Generic type parameter - -**Inherits from**: `IShowLabel` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoGenerateAllItem | `bool` | true | 获得/设置 是否自动生成模型的所有属性 默认为 true 生成所有属性 | -| Buttons | `RenderFragment?` | - | 获得/设置 按钮模板 | -| ColumnOrderCallback | `Func, IEnumerable>?` | - | 获得/设置 自定义列排序规则 默认 null 未设置 使用内部排序机制 1 2 3 0 -3 -2 -1 顺序 | -| FieldItems | `RenderFragment?` | - | 获得/设置 列模板 设置 时本参数不生效 | -| IsDisplay | `bool` | - | 获得/设置 是否显示为 Display 组件 默认为 false | -| IsRenderWhenValueChanged | `bool` | - | 获得/设置 当值变化时是否重新渲染组件 默认 false | -| IsShowDisplayTooltip | `bool` | - | 获得/设置 是否显示 Display 组件的 Tooltip 默认为 false | -| ItemChangedType | `ItemChangedType` | - | 获得/设置 实体类编辑模式 Add 还是 Update | -| Items | `IEnumerable?` | - | 获得/设置 级联上下文绑定字段信息集合 设置此参数后 模板不生效 | -| ItemsPerRow | `int?` | - | 获得/设置 每行显示组件数量 默认为 null | -| LabelAlign | `Alignment` | - | 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 | -| LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | -| Model | `TModel?` | - | 获得/设置 绑定模型 | -| PlaceHolderText | `string?` | - | 获得/设置 默认占位符文本 默认 null | -| RowType | `RowType` | - | 获得/设置 设置行格式 默认 Row 布局 | -| ShowLabel | `bool?` | - | 获得/设置 是否显示前置标签 默认为 null 未设置时默认显示标签 | -| ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null | -| ShowUnsetGroupItemsOnTop | `bool` | - | 获得/设置 未设置 GroupName 编辑项是否放置在顶部 默认 false | - - - -### Public Methods - -- `void Dispose()` - - - -### Source - -- Component: [src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/EditorForm/EditorForm.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/EditorForms.razor) - -## ValidateForm - -ValidateForm 组件类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | Specifies the content to be rendered inside this | -| DisableAutoSubmitFormByEnter | `bool?` | - | 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 | -| IsFormless | `bool` | - | 获得/设置 是否为无表单模式 默认 false | -| LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | -| Model | `object?` | - | Specifies the top-level model object for the form. An edit context will be constructed for this model. If using this parameter, do not also supply a value for . | -| OnFieldValueChanged | `Action?` | - | A callback that will be invoked when the field's value has been changed | -| OnInvalidSubmit | `Func?` | - | A callback that will be invoked when the form is submitted and the is determined to be invalid. | -| OnValidSubmit | `Func?` | - | A callback that will be invoked when the form is submitted and the is determined to be valid. | -| ShowAllInvalidResult | `bool` | - | 获得/设置 是否显示所有验证失败字段的提示信息 默认 false 仅显示第一个验证失败字段的提示信息 | -| ShowLabel | `bool?` | - | 获得/设置 是否显示验证表单内的 Label 默认为 null | -| ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示标签 Tooltip 多用于标签文字过长导致裁减时使用 默认 null | -| ShowRequiredMark | `bool` | true | 获得/设置 是否获取必填项标记 默认为 true 显示 | -| ValidateAllProperties | `bool` | - | 获得/设置 是否验证所有字段 默认 false | - - - -### Public Methods - -- `void NotifyFieldChanged(FieldIdentifier fieldIdentifier, object? value)` - - 通知属性改变方法 -- `Task SetError(Expression> expression, string errorMessage)` - - 设置指定字段错误信息 -- `Task SetError(string propertyName, string errorMessage)` - - 设置指定字段错误信息 -- `bool Validate()` - - 验证方法 用于代码调用触发表单验证 - -### Source - -- Component: [src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ValidateForm/ValidateForm.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-input.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-input.txt deleted file mode 100644 index 1687f83e94c..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-input.txt +++ /dev/null @@ -1,265 +0,0 @@ -# BootstrapBlazor Input Components - -> Auto-generated parameter reference for input components - -## Components - -- [BootstrapInput](#bootstrapinput) -- [BootstrapInputBase](#bootstrapinputbase) -- [BootstrapInputEventBase](#bootstrapinputeventbase) -- [BootstrapInputGroup](#bootstrapinputgroup) -- [BootstrapInputGroupIcon](#bootstrapinputgroupicon) -- [BootstrapInputNumber](#bootstrapinputnumber) -- [InputUpload](#inputupload) -- [OtpInput](#otpinput) -- [Textarea](#textarea) - -## BootstrapInput - -BootstrapInput 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoSetDefaultWhenNull | `bool` | - | 获得/设置 用户删除后是否自动更改为默认值 0 默认 false | -| ClearIcon | `string?` | - | 获得/设置 清空小按钮图标 默认 null | -| IsClearable | `bool` | - | 获得/设置 是否显示清空小按钮 默认 false | -| OnClear | `Func?` | - | 获得/设置 清空文本框时回调方法 默认 null | -| Readonly | `bool` | - | 获得/设置 是否为只读 默认 false | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Input/BootstrapInput.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInput.razor.cs) - -## BootstrapInputBase - -Base class for BootstrapInput components - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `ValidateBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Color | `Color` | Color.None | Gets or sets the button color | -| FormatString | `string?` | - | Gets or sets the format string, e.g., "yyyy-MM-dd" for date types | -| Formatter | `Func?` | - | Gets or sets the formatter function | -| IsAutoFocus | `bool` | - | Gets or sets whether to automatically focus, default is false | -| IsSelectAllTextOnEnter | `bool` | - | Gets or sets whether to automatically select all text on Enter key press, default is false | -| IsSelectAllTextOnFocus | `bool` | - | Gets or sets whether to automatically select all text on focus, default is false | -| IsTrim | `bool` | - | Gets or sets whether to automatically trim whitespace, default is false | -| OnBlurAsync | `Func?` | - | Gets or sets the callback method for blur event, default is null | -| OnEnterAsync | `Func?` | - | Gets or sets the callback method for Enter key press, default is null | -| OnEscAsync | `Func?` | - | Gets or sets the callback method for Esc key press, default is null | -| PlaceHolder | `string?` | - | Gets or sets the placeholder attribute value | - - - -### Public Methods - -- `Task EnterCallback()` - - Client-side EnterCallback method - - *[JSInvokable]* -- `Task EscCallback()` - - Client-side EscCallback method - - *[JSInvokable]* -- `Task FocusAsync()` - - Method to focus the element -- `ValueTask SelectAllTextAsync()` - - Method to select all text - -### Source - -- Component: [src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInputBase.cs) - -## BootstrapInputEventBase - -输入框基类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `BootstrapInputBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| UseInputEvent | `bool` | - | 获得/设置 是否在文本框输入值时触发 bind-value:event="oninput" 默认 false | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Input/BootstrapInputEventBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInputEventBase.cs) - -## BootstrapInputGroup - -BootstrapInputGroup 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Input/BootstrapInputGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInputGroup.razor.cs) - -## BootstrapInputGroupIcon - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Icon | `string?` | - | | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Input/BootstrapInputGroupIcon.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/BootstrapInputGroupIcon.razor.cs) - -## BootstrapInputNumber - -An input component for editing numeric values. Supported numeric types are , , , , , . - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Max | `string?` | - | 获得/设置 最大值 | -| Min | `string?` | - | 获得/设置 最小值 | -| MinusIcon | `string?` | - | 获得/设置 减小数值图标 | -| OnDecrement | `Func?` | - | 获得/设置 数值减少时回调委托 | -| OnIncrement | `Func?` | - | 获得/设置 数值增加时回调委托 | -| PlusIcon | `string?` | - | 获得/设置 增加数值图标 | -| ShowButton | `bool` | - | 获得/设置 是否显示加减按钮 | -| Step | `string?` | - | 获得/设置 步长 默认为 null | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumber.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/InputNumber/BootstrapInputNumber.razor.cs) - -## InputUpload - -InputUpload 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BrowserButtonClass | `string` | "btn-primary" | 获得/设置 上传按钮样式 默认 btn-primary | -| BrowserButtonIcon | `string?` | - | 获得/设置 浏览按钮图标 | -| BrowserButtonText | `string?` | - | 获得/设置 浏览按钮显示文字 | -| DeleteButtonClass | `string` | "btn-danger" | 获得/设置 删除按钮样式 默认 btn-danger | -| DeleteButtonIcon | `string?` | - | 获得/设置 删除按钮图标 | -| DeleteButtonText | `string?` | - | 获得/设置 重置按钮显示文字 | -| PlaceHolder | `string?` | - | 获得/设置 PlaceHolder 占位符文本 | -| ShowDeleteButton | `bool` | - | 获得/设置 是否显示删除按钮 默认为 false 不显示 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Upload/InputUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/InputUpload.razor.cs) - -## OtpInput - -OTP input component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Digits | `int` | 6 | Gets or sets the length of the OTP input. Default is 6. | -| IsReadonly | `bool` | - | Gets or sets whether the OTP input is readonly. Default is false. | -| PlaceHolder | `string?` | - | Gets or sets the placeholder of the OTP input. Default is null. | -| Type | `OtpInputType` | - | Gets or sets the value type of the OTP input. Default is . | - - - -### Public Methods - -- `Task TriggerSetValue(string val)` - - Trigger value changed event callback. Trigger by JavaScript. - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Input/OtpInput.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/OtpInput.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/OtpInputs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/OtpInputs.razor) - -## Textarea - -Textarea component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsAutoScroll | `bool` | - | Gets or sets whether auto-scroll is enabled. Default is false. | -| UseShiftEnter | `bool` | - | Gets or sets whether Shift + Enter replaces the default Enter key behavior. Default is false. | - - - -### Public Methods - -- `Task ScrollTo(int value)` - - Scroll to a specific value -- `Task ScrollToBottom()` - - Scroll to the bottom -- `Task ScrollToTop()` - - Scroll to the top - -### Source - -- Component: [src/BootstrapBlazor/Components/Textarea/Textarea.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Textarea/Textarea.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/TextAreas.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/TextAreas.razor) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-nav.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-nav.txt deleted file mode 100644 index d6b90e762d8..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-nav.txt +++ /dev/null @@ -1,671 +0,0 @@ -# BootstrapBlazor Navigation Components - -> Auto-generated parameter reference for nav components - -## Components - -- [Anchor](#anchor) -- [AnchorLink](#anchorlink) -- [Breadcrumb](#breadcrumb) -- [ContextMenu](#contextmenu) -- [ContextMenuZone](#contextmenuzone) -- [GotoNavigator](#gotonavigator) -- [Menu](#menu) -- [MenuLink](#menulink) -- [Nav](#nav) -- [Navbar](#navbar) -- [NavbarBrand](#navbarbrand) -- [NavbarCollapse](#navbarcollapse) -- [NavbarGroup](#navbargroup) -- [NavbarItem](#navbaritem) -- [NavbarLink](#navbarlink) -- [RibbonTab](#ribbontab) -- [RibbonTabHeader](#ribbontabheader) -- [SideMenu](#sidemenu) -- [SkeletonAvatar](#skeletonavatar) -- [Step](#step) -- [SubMenu](#submenu) -- [Tab](#tab) -- [TabLink](#tablink) -- [TopMenu](#topmenu) - -## Anchor - -Anchor 组件部分类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子内容 | -| Container | `string?` | - | 获得/设置 滚动组件 Id 默认为 null 使用最近滚动条容器元素 | -| IsAnimation | `bool` | true | 获得/设置 滚动时是否开启动画 默认 true | -| Offset | `int` | - | 获得/设置 距离顶端偏移量 默认为 0 | -| Target | `string?` | - | 获得/设置 目标组件 Id | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Anchor/Anchor.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Anchor/Anchor.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Anchors.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Anchors.razor) - -## AnchorLink - -AnchorLink 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Icon | `string?` | - | 获得/设置 锚点图标 默认 fa-solid fa-link | -| Text | `string?` | - | 获得/设置 组件 Text 显示文字 | -| TooltipText | `string?` | - | 获得/设置 组件 拷贝成功后 显示文字 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/AnchorLink/AnchorLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/AnchorLink/AnchorLink.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/AnchorLinks.razor) - -## Breadcrumb - -Breadcrumb 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Value | `IEnumerable?` | - | 获得/设置 数据集 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Breadcrumb/Breadcrumb.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Breadcrumb/Breadcrumb.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Breadcrumbs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Breadcrumbs.razor) - -## ContextMenu - -ContextMenu 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| OnBeforeShowCallback | `Func?` | - | 获得/设置 弹出前回调方法 默认 null | -| ShowShadow | `bool` | true | 获得/设置 是否显示阴影 默认 true | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/ContextMenu/ContextMenu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ContextMenu/ContextMenu.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ContextMenus.razor) - -## ContextMenuZone - -ContextMenuZone 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/ContextMenu/ContextMenuZone.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ContextMenu/ContextMenuZone.razor.cs) - -## GotoNavigator - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| GotoText | `string?` | - | 获得/设置 跳转文本 默认 null | -| Index | `int` | - | 获得/设置 跳转页码 默认 null | -| OnNavigation | `Func?` | - | 获得/设置 导航回调方法 默认 null | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Pagination/GotoNavigator.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Pagination/GotoNavigator.razor.cs) - -## Menu - -Menu 组件基类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| DisableNavigation | `bool` | - | 获得/设置 是否禁止导航 默认为 false 允许导航 | -| IndentSize | `int` | 16 | 获得/设置 缩进大小 默认为 16 单位 px | -| IsAccordion | `bool` | - | 获得/设置 是否为手风琴效果 默认为 false | -| IsBottom | `bool` | - | 获得/设置 侧边栏垂直模式在底部 默认 false | -| IsCollapsed | `bool` | - | 获得/设置 侧栏是否收起 默认 false 未收起 | -| IsExpandAll | `bool` | - | 获得/设置 是否全部展开 默认为 false | -| IsScrollIntoView | `bool` | true | 获得/设置 自动滚动到可视区域 默认 true 开启时生效 | -| IsVertical | `bool` | - | 获得/设置 侧栏垂直模式 默认 false | -| Items | `IEnumerable?` | - | 获得/设置 菜单数据集合 | -| OnClick | `Func?` | - | 获得/设置 菜单项点击回调委托 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Menu/Menu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/Menu.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Menus.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Menus.razor) - -## MenuLink - -MenuLink 组件内部封装 NavLink 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ArrowIcon | `string?` | - | 获得/设置 ArrowIcon 图标 | -| Item | `MenuItem?` | - | 获得/设置 MenuItem 实例 不可为空 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Menu/MenuLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/MenuLink.razor.cs) - -## Nav - -NavMenu 组件基类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Alignment | `Alignment` | Alignment.Left | 获得/设置 组件对齐方式 | -| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 | -| IsFill | `bool` | - | 获得/设置 是否填充 | -| IsJustified | `bool` | - | 获得/设置 是否等宽 | -| IsPills | `bool` | - | 获得/设置 是否为胶囊 | -| IsVertical | `bool` | - | 获得/设置 是否垂直分布 | -| Items | `IEnumerable?` | - | 获得/设置 组件数据源 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Nav/Nav.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Nav/Nav.razor.cs) - -## Navbar - -Navbar 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BackgroundColorCssClass | `string?` | - | 获得/设置 背景色样式名称 默认 null 未设置 | -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | -| Size | `Size` | Size.Medium | 获得/设置 组件大小 默认 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Navbar/Navbar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/Navbar.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Navbars.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Navbars.razor) - -## NavbarBrand - -NavBrand 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Navbar/NavbarBrand.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarBrand.razor.cs) - -## NavbarCollapse - -NavbarCollapse 组件用于在导航栏中适配响应式布局 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Navbar/NavbarCollapse.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarCollapse.razor.cs) - -## NavbarGroup - -NavbarGroup 组件用于在导航栏中分组 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | -| Height | `string?` | - | 获得/设置 高度值 默认 200px; | -| IsScrolling | `bool` | - | 获得/设置 是否启用滚动 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Navbar/NavbarGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarGroup.razor.cs) - -## NavbarItem - -NavbarItem 组件用于在导航栏中添加子组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Navbar/NavbarItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarItem.razor.cs) - -## NavbarLink - -NavbarLink 组件用于在导航栏中添加链接 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ImageCss | `string?` | - | The css class of img element default value null | -| ImageUrl | `string?` | - | 获得/设置 显示图片地址 默认为 null | -| Target | `string?` | - | 获得/设置 A 标签 target 参数 默认 null | -| Url | `string?` | - | 获得/设置 Url 默认为 # | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Navbar/NavbarLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarLink.razor.cs) - -## RibbonTab - -RibbonTab 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 内容模板 | -| DecodeAnchorCallback | `Func?` | - | 解码锚点回调方法 | -| EncodeAnchorCallback | `Func?` | - | 编码锚点回调方法 第一参数是当前地址 Url 第二个参数是当前选项 Text 属性 返回值为地址全路径 | -| IsBorder | `bool` | true | 获得/设置 是否为带边框卡片样式 默认 true | -| IsSupportAnchor | `bool` | - | 获得/设置 是否开启 Url 锚点 | -| Items | `IEnumerable?` | - | 获得/设置 数据源 | -| OnFloatChanged | `Func?` | - | 获得/设置 组件是否悬浮状态改变时回调方法 默认 null | -| OnItemClickAsync | `Func?` | - | 获得/设置 点击命令按钮回调方法 | -| OnMenuClickAsync | `Func?` | - | 获得/设置 点击标签 Menu 回调方法 | -| RibbonArrowDownIcon | `string?` | - | 获得/设置 选项卡向下箭头图标 | -| RibbonArrowPinIcon | `string?` | - | 获得/设置 选项卡可固定图标 | -| RibbonArrowUpIcon | `string?` | - | 获得/设置 选项卡向上箭头图标 | -| RightButtonsTemplate | `RenderFragment?` | - | 获得/设置 右侧按钮模板 | -| ShowFloatButton | `bool` | - | 获得/设置 是否显示悬浮小箭头 默认 false 不显示 | - - - -### Public Methods - -- `void Render()` - - 重新渲染组件 -- `void SetExpand()` - - SetExpand 方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/RibbonTab/RibbonTab.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/RibbonTab/RibbonTab.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/RibbonTabs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/RibbonTabs.razor) - -## RibbonTabHeader - -Header 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | 获得/设置 数据源 **[Required]** | -| DecodeAnchorCallback | `Func?` | - | 解码锚点回调方法 | -| EncodeAnchorCallback | `Func?` | - | 编码锚点回调方法 第一参数是当前地址 Url 第二个参数是当前选项 Text 属性 返回值为地址全路径 | -| IsSupportAnchor | `bool` | - | 获得/设置 是否开启 Url 锚点 | -| OnFloatChanged | `Func?` | - | 获得/设置 组件是否悬浮状态改变时回调方法 默认 null | -| OnItemClickAsync | `Func?` | - | 获得/设置 点击命令按钮回调方法 | -| OnMenuClickAsync | `Func?` | - | 获得/设置 点击标签 Menu 回调方法 | -| RibbonArrowDownIcon | `string?` | - | 获得/设置 选项卡向下箭头图标 | -| RibbonArrowPinIcon | `string?` | - | 获得/设置 选项卡可固定图标 | -| RibbonArrowUpIcon | `string?` | - | 获得/设置 选项卡向上箭头图标 | -| RightButtonsTemplate | `RenderFragment?` | - | 获得/设置 右侧按钮模板 | -| ShowFloatButton | `bool` | - | 获得/设置 是否显示悬浮小箭头 默认 false 不显示 | - - - -### Public Methods - -- `void Render()` - - 重新渲染组件 -- `void SetExpand()` - - SetExpand 方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/RibbonTab/RibbonTabHeader.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/RibbonTab/RibbonTabHeader.razor.cs) - -## SideMenu - -SideMenu 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ArrowIcon | `string?` | - | 获得/设置 菜单箭头图标 | -| DropdownIcon | `string?` | - | 获得/设置 组件数据源 | -| Items | `IEnumerable?` | - | 获得/设置 菜单数据集合 | -| OnClick | `Func?` | - | 获得/设置 菜单项点击回调委托 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Menu/SideMenu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/SideMenu.razor.cs) - -## SkeletonAvatar - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Circle | `bool` | - | 获得/设置 是否为圆形 默认为 false | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Skeleton/SkeletonAvatar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Skeleton/SkeletonAvatar.razor.cs) - -## Step - -Step 组件类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容实例 | -| FinishedTemplate | `RenderFragment?` | - | 获得/设置 步骤全部完成时模板 默认 null | -| IsVertical | `bool` | - | 获得/设置 是否垂直渲染 默认 false 水平渲染 | -| Items | `List?` | - | 获得/设置 步骤集合 | -| OnFinishedCallback | `Func?` | - | 获得/设置 步骤全部完成时回调方法 | -| StepIndex | `int` | - | 获得/设置 当前步骤索引 默认 0 | - - - -### Public Methods - -- `void Add(StepOption option)` - - 添加步骤到组件中 -- `void Insert(int index, StepOption option)` - - 插入步骤到组件中 -- `Task Next()` - - 移动到下一步方法 返回当前 StepIndex 值 -- `int Prev()` - - 移动到上一步方法 返回当前 StepIndex 值 -- `void Remove(StepOption option)` - - 从组件中移除步骤 -- `void Reset()` - - 重置步骤方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Step/Step.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Step/Step.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Steps.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Steps.razor) - -## SubMenu - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ArrowIcon | `string?` | - | 获得/设置 菜单箭头图标 | -| DropdownIcon | `string?` | - | 获得/设置 组件数据源 | -| Item | `MenuItem?` | - | 获得/设置 组件数据源 | -| OnClick | `Func?` | - | 获得/设置 菜单项点击回调委托 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Menu/SubMenu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/SubMenu.razor.cs) - -## Tab - -Tab component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AdditionalAssemblies | `IEnumerable?` | - | 获得/设置 Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. | -| AfterNavigatorTemplate | `RenderFragment?` | - | 获得/设置 标签页后置模板 默认 null 在向后移动标签页按钮前 | -| AllowDrag | `bool` | - | 获得/设置 是否允许拖放标题栏更改栏位顺序,默认为 false | -| BeforeContextMenuTemplate | `RenderFragment?` | - | Gets or sets the template of before context menu. Default is null. | -| BeforeNavigatorTemplate | `RenderFragment?` | - | 获得/设置 标签页前置模板 默认 null 在向前移动标签页按钮前 | -| Body | `RenderFragment?` | - | 获得/设置 TabItems 模板 | -| ButtonTemplate | `RenderFragment?` | - | 获得/设置 按钮模板 默认 null | -| ChildContent | `RenderFragment?` | - | 获得/设置 TabItems 模板 | -| ClickTabToNavigation | `bool` | - | 获得/设置 点击 TabItem 时是否自动导航 默认为 false 不导航 | -| CloseAllTabsText | `string?` | - | 获得/设置 关闭所有 TabItem 菜单文本 | -| CloseCurrentTabText | `string?` | - | 获得/设置 关闭当前 TabItem 菜单文本 | -| CloseIcon | `string?` | - | 获得/设置 关闭标签图标 | -| CloseOtherTabsText | `string?` | - | 获得/设置 关闭其他 TabItem 菜单文本 | -| CloseTabNavLinkTooltipText | `string?` | - | Gets or sets the close tab navigation link tooltip text. Default is null. | -| ContextMenuCloseAllIcon | `string?` | - | Gets or sets the icon of tab item context menu close all button. Default is null. | -| ContextMenuCloseIcon | `string?` | - | Gets or sets the icon of tab item context menu close button. Default is null. | -| ContextMenuCloseOtherIcon | `string?` | - | Gets or sets the icon of tab item context menu close other button. Default is null. | -| ContextMenuFullScreenIcon | `string?` | - | Gets or sets the icon of tab item context menu full screen button. Default is null. | -| ContextMenuRefreshIcon | `string?` | - | Gets or sets the icon of tab item context menu refresh button. Default is null. | -| ContextMenuTemplate | `RenderFragment?` | - | Gets or sets the template of context menu. Default is null. | -| DefaultUrl | `string?` | - | 获得/设置 默认标签页 关闭所有标签页时自动打开此地址 默认 null 未设置 | -| DropdownIcon | `string?` | - | 获得/设置 下拉菜单标签图标 | -| EnableErrorLogger | `bool?` | - | 获得/设置 是否开启全局异常捕获 默认 null 读取配置文件 值 | -| ErrorLoggerToastTitle | `string?` | - | 获得/设置 错误日志 弹窗标题 默认 null | -| ExcludeUrls | `IEnumerable?` | - | 获得/设置 排除地址支持通配符 | -| FullscreenToolbarButtonIcon | `string?` | - | Gets or sets the full screen toolbar button icon string. Default is null. | -| FullscreenToolbarTooltipText | `string?` | - | Gets or sets the full screen toolbar button tooltip string. Default is null. | -| Height | `int` | - | 获得/设置 组件高度 默认值为 0 高度自动 | -| IsBorderCard | `bool` | - | Gets or sets whether border card style. Default is false. | -| IsCard | `bool` | - | Gets or sets whether card style. Default is false. | -| IsLazyLoadTabItem | `bool` | - | 获得/设置 懒加载 TabItem, 首次不渲染 默认 false | -| IsLoopSwitchTabItem | `bool` | true | Gets or sets whether auto reset tab item index. Default is true. | -| IsOnlyRenderActiveTab | `bool` | - | 获得/设置 是否仅渲染 Active 标签 默认 false | -| Menus | `IEnumerable?` | - | 获得/设置 导航菜单集合 默认 null | -| NextIcon | `string?` | - | 获得/设置 下一个标签图标 | -| NextTabNavLinkTooltipText | `string?` | - | Gets or sets the next tab navigation link tooltip text. Default is null. | -| NotAuthorized | `RenderFragment?` | - | 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效 | -| NotFound | `RenderFragment?` | - | 获得/设置 NotFound 模板 默认 null NET6.0/7.0 有效 | -| NotFoundTabText | `string?` | - | 获得/设置 NotFound 标签文本 默认 null NET6.0/7.0 有效 | -| OnBeforeShowContextMenu | `Func>?` | - | Gets or sets before popup context menu callback. Default is null. | -| OnClickTabItemAsync | `Func?` | - | 获得/设置 点击 TabItem 时回调方法 | -| OnCloseTabItemAsync | `Func>?` | - | 关闭标签页回调方法 | -| OnDragItemEndAsync | `Func?` | - | 获得/设置 拖动标签页结束回调方法 | -| OnTabHeaderTextLocalizer | `Func?` | - | 获得/设置 Tab 标签头文本本地化回调方法 | -| OnToolbarRefreshCallback | `Func?` | - | Gets or sets the refresh toolbar button click event callback. Default is null. | -| Placement | `Placement` | Placement.Top | 获得/设置 组件标签显示位置 默认显示在 Top 位置 | -| PreviousIcon | `string?` | - | 获得/设置 上一个标签图标 | -| PrevTabNavLinkTooltipText | `string?` | - | Gets or sets the previous tab navigation link tooltip text. Default is null. | -| RefreshToolbarButtonIcon | `string?` | - | Gets or sets the refresh toolbar button icon string. Default is null. | -| RefreshToolbarTooltipText | `string?` | - | Gets or sets the refresh toolbar button tooltip string. Default is null. | -| ShowActiveBar | `bool` | true | 获得/设置 是否显示活动标签 默认为 true 显示 | -| ShowClose | `bool` | - | 获得/设置 是否显示关闭按钮 默认为 false 不显示 | -| ShowContextMenu | `bool` | - | Gets or sets whether enable tab context menu. Default is false. | -| ShowContextMenuFullScreen | `bool` | true | Gets or sets whether show the full screen button on context menu. Default is true. | -| ShowExtendButtons | `bool` | - | 获得/设置 是否显示扩展功能按钮 默认为 false 不显示 | -| ShowFullScreen | `bool` | - | 获得/设置 是否显示全屏按钮 默认为 false 不显示 | -| ShowFullscreenToolbarButton | `bool` | true | Gets or sets whether show the full screen button. Default is true. | -| ShowNavigatorButtons | `bool` | true | 获得/设置 是否显示前后导航按钮 默认为 true 显示 | -| ShowRefreshToolbarButton | `bool` | true | Gets or sets whether show the full screen button. Default is true. | -| ShowToolbar | `bool` | - | Gets or sets whether show the toolbar. Default is false. | -| TabHeader | `ITabHeader?` | - | Gets or sets the instance. Default is null. | -| TabStyle | `TabStyle` | - | Gets or sets the tab style. Default is . | -| ToolbarTemplate | `RenderFragment?` | - | Gets or sets the template of the toolbar button. Default is null. | - - - -### Public Methods - -- `void ActiveTab(TabItem item)` - - 设置指定 TabItem 为激活状态 -- `void ActiveTab(int index)` - - 设置指定 TabItem 为激活状态 -- `void AddTab(string url, string text, string? icon, bool active, bool closable)` - - 通过 Url 添加 TabItem 标签方法 -- `void AddTab(Dictionary parameters, int? index)` - - 添加 TabItem 方法 -- `void ClickNextTab()` - - 切换到下一个标签方法 -- `void ClickPrevTab()` - - 切换到上一个标签方法 -- `void CloseAllTabs()` - - 关闭所有标签页方法 -- `Task CloseCurrentTab()` - - 关闭当前标签页方法 -- `void CloseOtherTabs()` - - 关闭其他标签页方法 -- `Task DragItemCallback(int originIndex, int currentIndex)` - - 拖动 TabItem 回调方法有 JS 调用 - - *[JSInvokable]* -- `TabItem? GetActiveTab()` - - 获得当前活动 Tab -- `Task Refresh(TabItem item)` - - Refresh the tab item method -- `Task RemoveTab(TabItem item)` - - 移除 TabItem 方法 -- `void SetDisabledItem(TabItem item, bool disabled)` - - 设置 TabItem 禁用状态 -- `void SetTabHeader(ITabHeader tabHeader)` - - Sets the instance. - -### Source - -- Component: [src/BootstrapBlazor/Components/Tab/Tab.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tab/Tab.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Tabs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Tabs.razor) - -## TabLink - -Represents a link within a tab component. - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | Gets or sets the content of the component. Default is null | -| Closable | `bool` | true | Gets or sets a value indicating whether the tab item is closable. Default is true. | -| Icon | `string?` | - | Gets or sets the icon of the link. Default is null | -| OnClick | `Func?` | - | Gets or sets the callback method when the link is clicked. Default is null. | -| Text | `string?` | - | Gets or sets the text of the link. Default is null | -| Url | `string?` | - | Gets or sets the URL of the link. Default is null | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Tab/TabLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tab/TabLink.razor.cs) - -## TopMenu - -顶栏菜单 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ArrowIcon | `string?` | - | 获得/设置 菜单箭头图标 | -| DropdownIcon | `string?` | - | 获得/设置 组件数据源 | -| Items | `IEnumerable?` | - | 获得/设置 菜单数据集合 | -| OnClick | `Func?` | - | 获得/设置 菜单项点击回调委托 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Menu/TopMenu.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Menu/TopMenu.razor.cs) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-other.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-other.txt deleted file mode 100644 index 07aedec21b0..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-other.txt +++ /dev/null @@ -1,3641 +0,0 @@ -# BootstrapBlazor Other Components - -> Auto-generated parameter reference for other components - -## Components - -- [Affix](#affix) -- [Alert](#alert) -- [AlertBase](#alertbase) -- [AutoFill](#autofill) -- [Avatar](#avatar) -- [AvatarUpload](#avatarupload) -- [Badge](#badge) -- [BoolFilter](#boolfilter) -- [BootstrapBlazorIcon](#bootstrapblazoricon) -- [BootstrapBlazorRoot](#bootstrapblazorroot) -- [BootstrapComponentBase](#bootstrapcomponentbase) -- [BootstrapLabel](#bootstraplabel) -- [BootstrapLabelSetting](#bootstraplabelsetting) -- [Calendar](#calendar) -- [Camera](#camera) -- [Captcha](#captcha) -- [Carousel](#carousel) -- [Checkbox](#checkbox) -- [CheckboxList](#checkboxlist) -- [CheckboxListGeneric](#checkboxlistgeneric) -- [Circle](#circle) -- [CircleBase](#circlebase) -- [ClockPicker](#clockpicker) -- [ColorPicker](#colorpicker) -- [Console](#console) -- [ConsoleLogger](#consolelogger) -- [CountUp](#countup) -- [DatePickerBody](#datepickerbody) -- [DatePickerCell](#datepickercell) -- [DateTimeFilter](#datetimefilter) -- [DateTimePicker](#datetimepicker) -- [DateTimeRange](#datetimerange) -- [Display](#display) -- [DisplayBase](#displaybase) -- [Divider](#divider) -- [DropUpload](#dropupload) -- [Dropzone](#dropzone) -- [Empty](#empty) -- [EnumFilter](#enumfilter) -- [FileIcon](#fileicon) -- [FileListUploadBase](#filelistuploadbase) -- [FilterBase](#filterbase) -- [FilterLogicItem](#filterlogicitem) -- [FilterProvider](#filterprovider) -- [FlipClock](#flipclock) -- [FloatingLabel](#floatinglabel) -- [Footer](#footer) -- [Handwritten](#handwritten) -- [IdComponentBase](#idcomponentbase) -- [IFrame](#iframe) -- [ImagePreviewer](#imagepreviewer) -- [ImageViewer](#imageviewer) -- [IntersectionObserver](#intersectionobserver) -- [IntersectionObserverItem](#intersectionobserveritem) -- [Layout](#layout) -- [LayoutSplitBar](#layoutsplitbar) -- [Light](#light) -- [Link](#link) -- [ListGroup](#listgroup) -- [ListView](#listview) -- [LoadMore](#loadmore) -- [Logout](#logout) -- [LogoutLink](#logoutlink) -- [Marquee](#marquee) -- [MultiFilter](#multifilter) -- [NetworkMonitorIndicator](#networkmonitorindicator) -- [NotSupportFilter](#notsupportfilter) -- [NullSwitch](#nullswitch) -- [NumberFilter](#numberfilter) -- [Pagination](#pagination) -- [PaginationItem](#paginationitem) -- [Popover](#popover) -- [PopoverCompleteBase](#popovercompletebase) -- [Progress](#progress) -- [QueryBuilder](#querybuilder) -- [QueryGroup](#querygroup) -- [Radio](#radio) -- [RadioList](#radiolist) -- [RadioListGeneric](#radiolistgeneric) -- [Rate](#rate) -- [ReconnectorContent](#reconnectorcontent) -- [RenderTemplate](#rendertemplate) -- [Repeater](#repeater) -- [Row](#row) -- [Script](#script) -- [Scroll](#scroll) -- [Search](#search) -- [Segmented](#segmented) -- [ShieldBadge](#shieldbadge) -- [SkeletonBase](#skeletonbase) -- [Slider](#slider) -- [SpeechWave](#speechwave) -- [Spinner](#spinner) -- [Split](#split) -- [Stack](#stack) -- [StringFilter](#stringfilter) -- [SvgIcon](#svgicon) -- [SweetAlertBody](#sweetalertbody) -- [Switch](#switch) -- [ThemeProvider](#themeprovider) -- [Timeline](#timeline) -- [TimePicker](#timepicker) -- [TimePickerCell](#timepickercell) -- [Timer](#timer) -- [Toggle](#toggle) -- [ToggleBase](#togglebase) -- [Toolbar](#toolbar) -- [ToolbarItem](#toolbaritem) -- [Tooltip](#tooltip) -- [TooltipWrapperBase](#tooltipwrapperbase) -- [Transition](#transition) -- [Typed](#typed) -- [UploadBase](#uploadbase) -- [UploadPreviewList](#uploadpreviewlist) -- [ValidateBase](#validatebase) -- [Waterfall](#waterfall) -- [Watermark](#watermark) - -## Affix - -Affix 固钉组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 **[Required]** | -| Offset | `float` | - | 获得/设置 指定偏移量后触发 | -| Position | `AffixPosition` | - | 获得/设置 固定位置枚举 默认 | -| ZIndex | `int?` | - | 获得/设置 z-index 值 默认 100 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Affix/Affix.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Affix/Affix.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Affixs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Affixs.razor) - -## Alert - -Alert 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ShowBorder | `bool` | - | 获得/设置 是否显示边框 默认 false 不显示 | -| ShowShadow | `bool` | - | 获得/设置 是否显示阴影 默认 false 不显示 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Alert/Alert.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Alert/Alert.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Alerts.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Alerts.razor) - -## AlertBase - -Alert 警告框组件 - -**Inherits from**: `BootstrapComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 子组件 | -| Color | `Color` | Color.Primary | 获得/设置 颜色 | -| Icon | `string?` | - | 获得/设置 显示图标 | -| OnDismiss | `Func?` | - | 关闭警告框回调方法 | -| ShowBar | `bool` | - | 获得/设置 是否显示左侧 Bar | -| ShowDismiss | `bool` | - | 获得/设置 是否显示关闭按钮 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Alert/AlertBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Alert/AlertBase.cs) - -## AutoFill - -AutoFill component - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| DisplayCount | `int?` | - | Gets or sets the number of items to display when matching data. Default is null. | -| Icon | `string?` | - | Gets or sets the icon. | -| IgnoreCase | `bool` | true | Gets or sets whether to ignore case when matching. Default is true. | -| IsAutoClearWhenInvalid | `bool` | - | 获得/设置 输入框内容无效时是否自动清空内容 默认 false | -| IsLikeMatch | `bool` | - | Gets or sets whether to enable fuzzy search. Default is false. | -| IsVirtualize | `bool` | - | Gets or sets whether virtual scrolling is enabled. Default is false. | -| Items | `IEnumerable?` | - | Gets or sets the collection of items for the component. | -| LoadingIcon | `string?` | - | Gets or sets the loading icon. | -| OnClearAsync | `Func?` | - | Gets or sets the callback method when the clear button is clicked. Default is null. | -| OnCustomFilter | `Func>>?` | - | Gets or sets the custom collection filtering rules. | -| OnGetDisplayText | `Func?` | - | Gets or sets the method to get the display text from the model. Default is to use the ToString override method. | -| OnQueryAsync | `Func>>?` | - | Gets or sets the callback method for loading virtualized items. | -| OverscanCount | `int` | 3 | Gets or sets the overscan count for virtual scrolling. Default is 3. | -| RowHeight | `float` | 50f | Gets or sets the row height for virtual scrolling. Default is 50f. | -| ShowDropdownListOnFocus | `bool` | true | Gets or sets whether to expand the dropdown candidate menu when focused. Default is true. | -| ShowNoDataTip | `bool` | true | Gets or sets whether to show the no matching data option. Default is true. | - - - -### Public Methods - -- `void TriggerChange(string v)` - - 由客户端 JavaScript 触发 - - *[JSInvokable]* -- `Task TriggerFilter(string val)` - - Triggers the filter method. - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/AutoFill/AutoFill.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/AutoFills.razor) - -## Avatar - -Avatar 头像框组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| GetUrlAsync | `Func>?` | - | 获得/设置 获取图片地址异步回调方法 | -| Icon | `string?` | - | 获得/设置 头像框显示图标 | -| IsBorder | `bool` | - | 获得/设置 是否显示 Border 默认为 false | -| IsCircle | `bool` | - | 获得/设置 是否为圆形 | -| IsIcon | `bool` | - | 获得/设置 是否为图标 | -| IsText | `bool` | - | 获得/设置 是否为显示为文字 | -| Size | `Size` | Size.Medium | 获得/设置 头像框大小 | -| Text | `string?` | - | 获得/设置 头像框显示文字 | -| Url | `string?` | - | 获得/设置 Image 头像路径地址 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Avatar/Avatar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Avatar/Avatar.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Avatars.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Avatars.razor) - -## AvatarUpload - -头像上传组件 AvatarUpload Component - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AddIcon | `string?` | - | 获得/设置 新建图标 | -| AllowExtensions | `List?` | - | 获得/设置 图标文件扩展名集合 ".png" | -| BorderRadius | `string?` | - | Gets or sets the border radius. Default is null. | -| CanPreviewCallback | `Func?` | - | 获得/设置 是否允许预览回调方法 默认 null | -| DeleteIcon | `string?` | - | 获得/设置 删除图标 | -| Height | `int` | 100 | 获得/设置 文件预览框高度 | -| InvalidStatusIcon | `string?` | - | 获得/设置 状态正常图标 | -| IsCircle | `bool` | - | 获得/设置 是否圆形图片框 Avatar 模式时生效 默认为 false | -| IsUploadButtonAtFirst | `bool` | - | 获得/设置 继续上传按钮是否在列表前 默认 false | -| LoadingIcon | `string?` | - | 获得/设置 加载图标 | -| ValidStatusIcon | `string?` | - | 获得/设置 状态正常图标 | -| Width | `int` | 100 | 获得/设置 文件预览框宽度 | - - - -### Public Methods - -- `Task Preview()` - - 预览当前头像方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/AvatarUpload.razor.cs) - -## Badge - -Badge component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | Gets or sets the child content of the component. Default is false. | -| Color | `Color` | Color.Primary | Gets or sets the color of the badge. Default is . | -| IsPill | `bool` | - | Gets or sets whether the badge should be displayed as a pill (rounded) or not. Default is false. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Badge/Badge.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Badge/Badge.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Badges.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Badges.razor) - -## BoolFilter - -BoolFilter component is used for boolean value filtering in table column. - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/BoolFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/BoolFilter.razor.cs) - -## BootstrapBlazorIcon - -Icon 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| IsSvgSprites | `bool` | - | 获得/设置 是否为 svg sprites 默认 false | -| Name | `string?` | - | 获得/设置 图标名称 | -| Url | `string?` | - | 获得/设置 Svg Sprites 路径 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Icon/BootstrapBlazorIcon.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Icon/BootstrapBlazorIcon.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/BootstrapBlazorIcons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/BootstrapBlazorIcons.razor) - -## BootstrapBlazorRoot - -BootstrapBlazorRoot 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| EnableErrorLogger | `bool?` | - | 获得/设置 是否开启全局异常捕获 默认 null 读取配置文件 EnableErrorLogger 值 | -| OnErrorHandleAsync | `Func?` | - | 获得/设置 自定义错误处理回调方法 | -| ShowToast | `bool?` | - | 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 | -| ToastTitle | `string?` | - | 获得/设置 Error Toast 弹窗标题 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/BaseComponents/BootstrapBlazorRoot.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/BaseComponents/BootstrapBlazorRoot.razor.cs) - -## BootstrapComponentBase - -Bootstrap Blazor 组件基类 - -**Inherits from**: `ComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AdditionalAttributes | `IDictionary?` | - | 获得/设置 用户自定义属性 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/BaseComponents/BootstrapComponentBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/BaseComponents/BootstrapComponentBase.cs) - -## BootstrapLabel - -BootstrapLabel 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | -| ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示 | -| Value | `string?` | - | 获得/设置 组件值 显示文本 默认 null | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Label/BootstrapLabel.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Label/BootstrapLabel.razor.cs) - -## BootstrapLabelSetting - -BootstrapLabelSetting 组件类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| LabelWidth | `int?` | - | 获得/设置 标签宽度 默认 null 未设置使用全局设置 --bb-row-label-width 值 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Label/BootstrapLabelSetting.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Label/BootstrapLabelSetting.razor.cs) - -## Calendar - -日历框组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 Body 模板仅 有效 | -| CellTemplate | `RenderFragment?` | - | 获得/设置 单元格模板 | -| ChildContent | `RenderFragment?` | - | 获得/设置 周内容 时有效 | -| FirstDayOfWeek | `DayOfWeek` | DayOfWeek.Sunday | 获得/设置 星期第一天 默认 | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 列头模板 | -| OnValueChanged | `Func?` | - | 获得/设置 值改变时回调委托 | -| ShowYearButtons | `bool` | true | 获得/设置 是否显示年按钮 | -| Value | `DateTime` | - | 获得/设置 组件值 | -| ViewMode | `CalendarViewMode` | - | 获得/设置 是否显示周视图 默认为 月视图 | -| ValueChanged | `EventCallback` | - | 获得/设置 值改变时回调委托 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 值改变时回调委托 | - -### Source - -- Component: [src/BootstrapBlazor/Components/Calendar/Calendar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Calendar/Calendar.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Calendars.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Calendars.razor) - -## Camera - -Camera 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoStart | `bool` | - | 获得/设置 是否自动开启摄像头 默认为 false | -| CaptureJpeg | `bool` | - | 获得/设置 拍照格式为 Jpeg 默认为 false 使用 png 格式 | -| DeviceId | `string?` | - | 获得/设置 当前设备 Id 默认 null | -| OnClose | `Func?` | - | 获得/设置 关闭摄像头回调方法 | -| OnError | `Func?` | - | 获得/设置 拍照出错回调方法 | -| OnInit | `Func, Task>?` | - | 获得/设置 初始化摄像头回调方法 | -| OnOpen | `Func?` | - | 获得/设置 打开摄像头回调方法 | -| Quality | `float` | 0.9f | 获得/设置 图像质量 默认为 0.9 | -| VideoHeight | `int?` | 240 | 获得/设置 摄像头视频高度 默认 240 | -| VideoWidth | `int?` | 320 | 获得/设置 摄像头视频宽度 默认 320 | - - - -### Public Methods - -- `Task Capture()` - - 拍照方法 -- `Task Close()` - - 关闭摄像头 -- `Task Open()` - - 打开摄像头 -- `Task Resize(int width, int height)` - - 重置宽高方法 -- `Task SaveAndDownload(string? fileName)` - - 保存并下载图片 -- `Task TriggerClose()` - - 停止摄像头回调方法 - - *[JSInvokable]* -- `Task TriggerError(string err)` - - 扫描发生错误回调方法 - - *[JSInvokable]* -- `Task TriggerInit(List devices)` - - 初始化设备方法 - - *[JSInvokable]* -- `Task TriggerOpen()` - - 开启摄像头回调方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Camera/Camera.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Camera/Camera.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Cameras.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Cameras.razor) - -## Captcha - -Captcha 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BarIcon | `string?` | - | 获得/设置 刷新按钮图标 默认值 fa-solid fa-arrow-right | -| BarText | `string?` | - | 获得/设置 Bar 显示文本 | -| Diameter | `int` | 9 | 获得/设置 拼图直径 | -| FailedText | `string?` | - | 获得/设置 Bar 显示文本 | -| GetImageName | `Func?` | - | 获得/设置 获取背景图方法委托 | -| HeaderText | `string?` | - | 获得/设置 Header 显示文本 | -| Height | `int` | 155 | 获得/设置 图片高度 | -| ImagesName | `string` | "Pic.jpg" | 获得/设置 图床路径 默认值为 Pic.jpg | -| ImagesPath | `string` | "images" | 获得/设置 图床路径 默认值为 images | -| LoadText | `string?` | - | 获得/设置 Bar 显示文本 | -| Max | `int` | 1024 | 获得/设置 随机图片最大张数 默认 1024 | -| Offset | `int` | 5 | 获得/设置 容错偏差 | -| OnValidAsync | `Func?` | - | 获得/设置 验证码结果回调委托 | -| RefreshIcon | `string?` | - | 获得/设置 刷新按钮图标 默认值 fa-solid fa-arrows-rotate | -| SideLength | `int` | 42 | 获得/设置 拼图边长 | -| Width | `int` | 280 | 获得/设置 图片宽度 | - - - -### Public Methods - -- `Task Reset()` - - 重置组件方法 -- `Task Verify(int offset, List trails)` - - 验证方差方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Captcha/Captcha.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Captcha/Captcha.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Captchas.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor) - -## Carousel - -Carousel 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 要求使用 | -| DisableTouchSwiping | `bool` | - | 获得/设置 是否禁用移动端手势滑动 默认 false | -| HoverPause | `bool` | true | 获得/设置 鼠标悬停时是否暂停播放 默认 true | -| Images | `IEnumerable` | [] | 获得 Images 集合 | -| IsFade | `bool` | - | 获得/设置 是否采用淡入淡出效果 默认为 false | -| NextIcon | `string?` | - | 获得/设置 下一页图标 | -| OnClick | `Func?` | - | 获得/设置 点击 Image 回调委托 | -| OnSlideChanged | `Func?` | - | 获得/设置 幻灯片切换后回调方法 | -| PlayMode | `CarouselPlayMode` | - | 获得/设置 自动播放方式 默认 | -| PreviousIcon | `string?` | - | 获得/设置 上一页图标 | -| ShowControls | `bool` | true | 获得/设置 是否显示控制按钮 默认 true | -| ShowIndicators | `bool` | true | 获得/设置 是否显示指示标志 默认 true | -| Width | `string?` | - | 获得/设置 内部图片的宽度 | - - - -### Public Methods - -- `ValueTask TriggerSlideChanged(int index)` - - 幻灯片切换事件回调 由 JavaScript 调用 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Carousel/Carousel.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Carousel/Carousel.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Carousels.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Carousels.razor) - -## Checkbox - -Checkbox 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `ValidateBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 RenderFragment 实例 | -| Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | -| OnBeforeStateChanged | `Func>?` | - | 获得/设置 选中状态改变前回调此方法 返回 false 可以阻止状态改变 | -| OnStateChanged | `Func?` | - | 获得/设置 选择框状态改变时回调此方法 | -| ShowAfterLabel | `bool` | - | 获得/设置 是否显示 Checkbox 后置 label 文字 默认为 false | -| Size | `Size` | - | 获得/设置 Size 大小 默认为 None | -| State | `CheckboxState` | - | 获得/设置 选择框状态 | -| StopPropagation | `bool` | - | 获得/设置 是否事件冒泡 默认为 false | -| StateChanged | `EventCallback` | - | 获得/设置 State 状态改变回调方法 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| StateChanged | `EventCallback` | 获得/设置 State 状态改变回调方法 | - -### Public Methods - -- `ValueTask OnStateChangedAsync(CheckboxState state)` - - 触发 Click 方法 由 JavaScript 调用 - - *[JSInvokable]* -- `Task OnToggleClick()` - - 点击组件触发方法 内部调用 回调方法 -- `Task SetState(CheckboxState state)` - - 设置 复选框状态方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Checkbox/Checkbox.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Checkbox/Checkbox.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Checkboxs.razor) - -## CheckboxList - -CheckboxList 组件基类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `ValidateBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CheckboxItemClass | `string?` | - | 获得/设置 Checkbox 组件布局样式 | -| Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | -| IsButton | `bool` | - | 获得/设置 是否为按钮样式 默认 false | -| IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | -| Items | `IEnumerable?` | - | 获得/设置 数据源 | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 项模板 | -| MaxSelectedCount | `int` | - | 获得/设置 最多选中数量 | -| OnMaxSelectedCountExceed | `Func?` | - | 获得/设置 超过最大选中数量时回调委托 | -| OnSelectedChanged | `Func, TValue, Task>?` | - | 获得/设置 SelectedItemChanged 方法 | -| ShowBorder | `bool` | true | 获得/设置 非按钮模式下是否显示组件边框 默认为 true | -| ShowButtonBorderColor | `bool` | - | 获得/设置 是否显示按钮边框颜色 默认为 false | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Checkbox/CheckboxList.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/CheckboxLists.razor) - -## CheckboxListGeneric - -CheckboxList 组件基类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `IModelEqualityComparer` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CheckboxItemClass | `string?` | - | 获得/设置 Checkbox 组件布局样式 | -| Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | -| CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 | -| IsButton | `bool` | - | 获得/设置 是否为按钮样式 默认 false | -| IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | -| Items | `IEnumerable>?` | - | 获得/设置 数据源 | -| ItemTemplate | `RenderFragment>?` | - | 获得/设置 项模板 | -| MaxSelectedCount | `int` | - | 获得/设置 最多选中数量 | -| ModelEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | -| OnMaxSelectedCountExceed | `Func?` | - | 获得/设置 超过最大选中数量时回调委托 | -| OnSelectedChanged | `Func>, List, Task>?` | - | 获得/设置 SelectedItemChanged 方法 | -| ShowBorder | `bool` | true | 获得/设置 是否显示边框 默认为 true | - - - -### Public Methods - -- `bool Equals(TValue? x, TValue? y)` - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Checkbox/CheckboxListGeneric.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Checkbox/CheckboxListGeneric.razor.cs) - -## Circle - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Value | `int` | - | 获得/设置 当前值 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Circle/Circle.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Circle/Circle.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Circles.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Circles.razor) - -## CircleBase - -Circle 组件基类 - -**Inherits from**: `BootstrapModuleComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| Color | `Color` | Color.Primary | 获得/设置 组件进度条颜色 | -| ShowProgress | `bool` | true | 获得/设置 是否显示进度百分比 默认显示 | -| StrokeWidth | `int` | 2 | 获得/设置 进度条宽度 默认为 2 | -| Width | `int` | 120 | 获得/设置 文件预览框宽度 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Circle/CircleBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Circle/CircleBase.cs) - -## ClockPicker - -ClockPicker 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsAutoSwitch | `bool` | true | 获得/设置 是否自动切换 小时、分钟、秒 自动切换 默认 true | -| ShowClockScale | `bool` | - | 获得/设置 是否显示表盘刻度 默认 false | -| ShowMinute | `bool` | true | 获得/设置 是否显示分钟 默认 true | -| ShowSecond | `bool` | true | 获得/设置 是否显示秒 默认 true | - - - -### Public Methods - -- `void SetTime(int hour, int minute, int second)` - - JSInvoke 调用此方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/ClockPicker/ClockPicker.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ClockPicker/ClockPicker.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/ClockPickers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ClockPickers.razor) - -## ColorPicker - -ColorPicker 颜色拾取器组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Formatter | `Func>?` | - | 获得/设置 显示颜色值格式化回调方法 | -| IsSupportOpacity | `bool` | - | 获得/设置 是否支持透明度 默认 false 不支持 | -| Swatches | `List?` | - | 获得/设置 预设候选颜色 开启时生效 默认 null | -| Template | `RenderFragment?` | - | 获得/设置 显示模板 | - - - -### Public Methods - -- `Task OnColorChanged(string value)` - - 选中颜色值变化时回调此方法 由 JavaScript 调用 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/ColorPicker/ColorPicker.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ColorPicker/ColorPicker.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ColorPickers.razor) - -## Console - -控制台消息组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoScrollText | `string?` | - | 获得/设置 自动滚屏显示文字 | -| ClearButtonColor | `Color` | Color.Secondary | 获得/设置 清除按钮颜色 默认值为 Color.Secondary | -| ClearButtonIcon | `string?` | - | 获得/设置 按钮 显示图标 默认值为 fa-solid fa-xmark | -| ClearButtonText | `string?` | - | 获得/设置 按钮 显示文字 默认值为 清屏 | -| FooterTemplate | `RenderFragment?` | - | 获得/设置 Footer 模板 | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 Header 模板 | -| HeaderText | `string?` | - | 获得/设置 Header 显示文字 默认值为 系统监控 | -| Height | `int` | - | 获得/设置 组件高度 默认为 126px; | -| IsAutoScroll | `bool` | true | 获得/设置 是否自动滚屏 默认 true | -| IsFlashLight | `bool` | true | 获得/设置 指示灯 是否闪烁 默认 true 闪烁 | -| Items | `IEnumerable?` | - | 获得/设置 组件绑定数据源 | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 Item 模板 | -| LightColor | `Color` | Color.Success | 获得/设置 指示灯颜色 | -| LightTitle | `string?` | - | 获得/设置 指示灯 Title 显示文字 | -| OnClear | `Func?` | - | 获得/设置 清空委托方法 | -| ShowAutoScroll | `bool` | - | 获得/设置 是否显示自动滚屏选项 默认 false | -| ShowLight | `bool` | true | 获得/设置 是否显示指示灯 默认 true 显示 | - - - -### Public Methods - -- `Task OnClearConsole()` - - 清空控制台消息方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Console/Console.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Console/Console.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Consoles.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Consoles.razor) - -## ConsoleLogger - -Logger 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsHtml | `bool` | - | 获得/设置 是否为 Html 代码 默认 false | -| Max | `int` | 3 | 获得/设置 最大行数 默认 3 行 | - - - -### Public Methods - -- `void Log(string message)` - - 输入日志方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Console/ConsoleLogger.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Console/ConsoleLogger.razor.cs) - -## CountUp - -CountUp 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| OnCompleted | `Func?` | - | 获得/设置 计数结束回调方法 默认 null | -| Option | `CountUpOption?` | - | 获得/设置 计数配置项 默认 null | -| Value | `TValue?` | - | 获得/设置 Value 值 | - - - -### Public Methods - -- `Task OnCompleteCallback()` - - OnCompleted 回调方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/CountUp/CountUp.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/CountUp/CountUp.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/CountUps.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/CountUps.razor) - -## DatePickerBody - -日期选择组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoClose | `bool` | - | 获得/设置 点击日期时是否自动关闭弹窗 默认 false | -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | -| ClearButtonText | `string?` | - | 获得/设置 清空按钮文字 | -| ConfirmButtonText | `string?` | - | 获得/设置 确定按钮文字 | -| DateFormat | `string?` | - | 获得/设置 日期格式字符串 默认为 null | -| DatePlaceHolder | `string?` | - | 获得/设置 日期 PlaceHolder 字符串 | -| DateTimeFormat | `string?` | - | 获得/设置 日期时间格式字符串 默认为 null | -| DayDisabledTemplate | `RenderFragment?` | - | 获得/设置 禁用日单元格模板 | -| DayTemplate | `RenderFragment?` | - | 获得/设置 日单元格模板 | -| EnableDisabledDaysCache | `bool` | true | 获得/设置 是否启用获得自定义禁用日期缓存 | -| FirstDayOfWeek | `DayOfWeek` | DayOfWeek.Sunday | 获得/设置 星期第一天 默认 | -| MaxValue | `DateTime?` | - | 获得/设置 当前日期最大值 | -| MinValue | `DateTime?` | - | 获得/设置 当前日期最小值 | -| NextMonthIcon | `string?` | - | 获得/设置 上一年图标 | -| NextYearIcon | `string?` | - | 获得/设置 上一年图标 | -| NowButtonText | `string?` | - | 获得/设置 此刻按钮文字 | -| OnClear | `Func?` | - | 获得/设置 清空按钮回调委托 | -| OnConfirm | `Func?` | - | 获得/设置 确认按钮回调委托 | -| OnDateChanged | `Func?` | - | 获得/设置 年月改变时回调方法 | -| OnGetDisabledDaysCallback | `Func>>?` | - | 获取/设置 获得月自定义禁用日期回调方法,默认 null 内部默认启用数据缓存 可通过 参数关闭 | -| PickTimeMode | `PickTimeMode` | PickTimeMode.Dropdown | 获得/设置 选择时间方式 默认使用 | -| PreviousMonthIcon | `string?` | - | 获得/设置 上一年图标 | -| PreviousYearIcon | `string?` | - | 获得/设置 上一年图标 | -| ShowClearButton | `bool` | - | 获得/设置 是否显示 Clear 按钮 默认 false 不显示 | -| ShowFestivals | `bool` | - | 获得/设置 是否显示节日 默认 false | -| ShowFooter | `bool` | - | 获得/设置 是否显示 Footer 区域 默认为 false 不显示 | -| ShowHolidays | `bool` | - | 获得/设置 是否显示休假日 默认 false | -| ShowLeftButtons | `bool` | true | 获得/设置 是否显示左侧控制按钮 默认显示 | -| ShowLunar | `bool` | - | 获得/设置 是否显示中国阴历历法 默认 false | -| ShowRightButtons | `bool` | true | 获得/设置 是否显示右侧控制按钮 默认显示 | -| ShowSidebar | `bool` | - | 获得/设置 是否显示快捷侧边栏 默认 false 不显示 | -| ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | -| SidebarTemplate | `RenderFragment>?` | - | 获得/设置 侧边栏模板 默认 null | -| TimeFormat | `string?` | - | 获得/设置 时间格式字符串 默认为 null | -| TimePlaceHolder | `string?` | - | 获得/设置 时间 PlaceHolder 字符串 | -| Value | `DateTime` | - | 获得/设置 组件值 | -| ViewMode | `DatePickerViewMode` | DatePickerViewMode.Date | 获得/设置 组件显示模式 默认为显示年月日模式 | -| ValueChanged | `EventCallback` | - | 获得/设置 组件值改变时回调委托供双向绑定使用 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 组件值改变时回调委托供双向绑定使用 | - -### Public Methods - -- `void ClearDisabledDays()` - - 清除内部缓存方法 -- `bool IsDisableDay(DateTime val)` - - 判定当前日期是否为禁用日期 - -### Source - -- Component: [src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DateTimePicker/DatePickerBody.razor.cs) - -## DatePickerCell - -DateTimePickerCell 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| OnClick | `Func?` | - | 获得/设置 按钮点击回调方法 默认 null | -| ShowFestivals | `bool` | - | 获得/设置 是否节日 默认 false | -| ShowHolidays | `bool` | - | 获得/设置 是否显示休假日 默认 false | -| ShowLunar | `bool` | - | 获得/设置 是否显示中国阴历历法 默认 false | -| ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | -| Template | `RenderFragment?` | - | 获得/设置 单元格模板 默认 null | -| Text | `string?` | - | 获得/设置 日期 | -| Value | `DateTime` | - | 获得/设置 日期 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/DateTimePicker/DatePickerCell.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DateTimePicker/DatePickerCell.razor.cs) - -## DateTimeFilter - -DateTime filter component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/DateTimeFilter.razor.cs) - -## DateTimePicker - -DateTimePicker 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoClose | `bool` | true | 获得/设置 是否点击日期后自动关闭弹窗 默认 true | -| AutoToday | `bool` | true | 获得/设置 是否自动设置值为当前时间 默认 true | -| ButtonColor | `Color` | Color.Primary | 获得/设置 选择按钮颜色 默认 | -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | -| Color | `Color` | Color.None | 获得/设置 控件边框颜色样式 默认为 None 显示 | -| DateFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd" | -| DatePlaceHolderText | `string?` | - | 获得/设置 日期占位符文本 默认 null 读取资源文件 | -| DateTimeFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd HH:mm:ss" | -| DateTimePlaceHolderText | `string?` | - | 获得/设置 日期时间占位符文本 默认 null 读取资源文件 | -| DayDisabledTemplate | `RenderFragment?` | - | 获得/设置 禁用日单元格模板 | -| DayTemplate | `RenderFragment?` | - | 获得/设置 日单元格模板 | -| DisplayDisabledDayAsEmpty | `bool` | - | 获得/设置 是否将禁用日期显示为空字符串 默认 false 开启后组件会频繁调用 方法,建议外部使用缓存提高性能 | -| DisplayMinValueAsEmpty | `bool` | true | 获得/设置 是否将 显示为空字符串 默认 true | -| EnableDisabledDaysCache | `bool` | true | 获得/设置 是否启用获得年自定义禁用日期缓存 | -| FirstDayOfWeek | `DayOfWeek` | DayOfWeek.Sunday | 获得/设置 星期第一天 默认 | -| Icon | `string?` | - | 获得/设置 组件图标 默认 fa-regular fa-calendar-days | -| IsButton | `bool` | - | 获得/设置 是否显示为按钮样式 默认 false | -| IsEditable | `bool` | - | 获得/设置 是否可以编辑内容 默认 false | -| MaxValue | `DateTime?` | - | 获得/设置 当前日期最大值 | -| MinValue | `DateTime?` | - | 获得/设置 当前日期最小值 | -| OnBlurAsync | `Func?` | - | 获得/设置 失去焦点回调方法 默认 null | -| OnGetDisabledDaysCallback | `Func>>?` | - | 获取/设置 获得自定义禁用日期回调方法,默认 null 内部默认启用数据缓存 可通过 参数关闭 | -| PickerButtonText | `string?` | - | 获得/设置 选择按钮文本 默认 null 读取资源文件 | -| PickTimeMode | `PickTimeMode` | PickTimeMode.Dropdown | 获得/设置 选择时间方式 默认使用 | -| ShowFestivals | `bool` | - | 获得/设置 是否显示节日 默认 false | -| ShowHolidays | `bool` | - | 获得/设置 是否显示休假日 默认 false | -| ShowIcon | `bool` | true | 获得/设置 是否显示组件图标 默认 true 显示 | -| ShowLunar | `bool` | - | 获得/设置 是否显示中国阴历历法 默认 false | -| ShowSidebar | `bool` | - | 获得/设置 是否显示快捷侧边栏 默认不显示 | -| ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | -| SidebarTemplate | `RenderFragment>?` | - | 获得/设置 侧边栏模板 默认 null | -| TimeFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "HH:mm:ss" | -| ViewMode | `DatePickerViewMode` | DatePickerViewMode.Date | 获得/设置 组件显示模式 默认为显示年月日模式 | - - - -### Public Methods - -- `void ClearDisabledDays()` - - 清除内部缓存方法 -- `Task TriggerHideCallback()` - - 客户端弹窗关闭后由 Javascript 调用此方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DateTimePicker/DateTimePicker.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/DateTimePickers.razor) - -## DateTimeRange - -DateTimeRange 时间范围组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoClose | `bool` | - | Gets or sets whether to automatically close the popup after a date range is selected. Default is false. | -| AutoCloseClickSideBar | `bool` | - | 获得/设置 是否点击快捷侧边栏自动关闭弹窗 默认 false | -| ClearButtonText | `string?` | - | 获得/设置 清空按钮文字 | -| ClearIcon | `string?` | - | 获得/设置 清空图标 默认 fa-solid fa-circle-xmark | -| ConfirmButtonText | `string?` | - | 获得/设置 确定按钮文字 | -| DateFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd" | -| DateTimeFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "yyyy-MM-dd HH:mm:ss" | -| Icon | `string?` | - | 获得/设置 组件图标 | -| IsEditable | `bool` | - | 获得/设置 是否可以编辑内容 默认 false | -| MaxValue | `DateTime` | DateTime.MaxValue | 获得/设置 最大值 | -| MinValue | `DateTime` | DateTime.MinValue | 获得/设置 最小值 | -| OnClearValue | `Func?` | - | 点击清空按钮回调委托方法 | -| OnConfirm | `Func?` | - | 点击确认按钮回调委托方法 | -| OnDateClick | `Func?` | - | Gets or sets the date value changed event callback. | -| RenderMode | `DateTimeRangeRenderMode` | DateTimeRangeRenderMode.Double | 获得/设置 组件显示模式 默认为显示年月日模式 | -| ShowClearButton | `bool` | true | 获得/设置 是否显示清空按钮 默认 true | -| ShowFestivals | `bool` | - | 获得/设置 是否显示节日 默认 false | -| ShowHolidays | `bool` | - | 获得/设置 是否显示休假日 默认 false | -| ShowLunar | `bool` | - | 获得/设置 是否显示中国阴历历法 默认 false | -| ShowSelectedValue | `bool` | - | Gets or sets whether show the selected value. Default is false. | -| ShowSidebar | `bool` | - | 获得/设置 是否显示快捷侧边栏 默认不显示 | -| ShowSolarTerm | `bool` | - | 获得/设置 是否显示中国 24 节气 默认 false | -| ShowToday | `bool` | - | 获得/设置 是否显示今天按钮 默认为 false | -| SidebarItems | `List?` | - | 获得/设置 侧边栏快捷选项集合 | -| TimeFormat | `string?` | - | 获得/设置 时间格式化字符串 默认值为 "HH:mm:ss" | -| TodayButtonText | `string?` | - | 获得/设置 今天按钮文字 | -| ViewMode | `DatePickerViewMode` | DatePickerViewMode.Date | 获得/设置 组件显示模式 默认为显示年月日模式 | - - - -### Public Methods - -- `Task TriggerHideCallback()` - - 客户端弹窗关闭后由 Javascript 调用此方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/DateTimeRange/DateTimeRange.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DateTimeRange/DateTimeRange.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/DateTimeRanges.razor) - -## Display - -Display 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `ILookup` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| FormatString | `string?` | - | 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd | -| FormatterAsync | `Func>?` | - | 获得/设置 异步格式化字符串 | -| Lookup | `IEnumerable?` | - | | -| LookupService | `ILookupService?` | - | | -| LookupServiceData | `object?` | - | | -| LookupServiceKey | `string?` | - | | -| LookupStringComparison | `stringComparison` | StringComparison.OrdinalIgnoreCase | | -| ShowTooltip | `bool` | - | 获得/设置 是否显示 Tooltip 多用于标签文字过长导致裁减时使用 默认 false 不显示 | -| TypeResolver | `Func?` | - | 获得/设置 类型解析回调方法 组件泛型为 Array 时内部调用 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Display/Display.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Display/Display.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Displays.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Displays.razor) - -## DisplayBase - -显示组件基类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `BootstrapModuleComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| DisplayText | `string?` | - | 获得/设置 显示名称 | -| ShowLabel | `bool?` | - | 获得/设置 是否显示前置标签 默认值为 null 为空时默认不显示标签 | -| ShowLabelTooltip | `bool?` | - | 获得/设置 是否显示 Tooltip 多用于文字过长导致裁减时使用 默认 null | -| Value | `TValue?` | - | Gets or sets the value of the input. This should be used with two-way binding. | -| ValueExpression | `Expression>?` | - | Gets or sets an expression that identifies the bound value. | -| ValueChanged | `EventCallback` | - | Gets or sets a callback that updates the bound value. | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ValueChanged | `EventCallback` | Gets or sets a callback that updates the bound value. | - -### Source - -- Component: [src/BootstrapBlazor/Components/Display/DisplayBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Display/DisplayBase.cs) - -## Divider - -Divider 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Alignment | `Alignment` | Alignment.Center | 获得/设置 组件对齐方式 默认为居中 | -| ChildContent | `RenderFragment?` | - | 获得/设置 子内容 | -| Icon | `string?` | - | 获得/设置 文案显示图标 | -| IsVertical | `bool` | - | 获得/设置 是否为垂直显示 默认为 false | -| Text | `string?` | - | 获得/设置 文案显示文字 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Divider/Divider.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Divider/Divider.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Dividers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Dividers.razor) - -## DropUpload - -DropUpload 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 Body 模板 默认 null 设置 BodyTemplate 后 不生效 | -| FooterTemplate | `RenderFragment?` | - | 获得/设置 Footer 字符串模板 默认 null 未设置 | -| FooterText | `string?` | - | 获得/设置 Footer 字符串信息 默认 null 未设置 | -| IconTemplate | `RenderFragment?` | - | 获得/设置 图标模板 默认 null | -| InvalidStatusIcon | `string?` | - | 获得/设置 上传失败状态图标 | -| LoadingIcon | `string?` | - | 获得/设置 加载中图标 | -| OnGetFileFormat | `Func?` | - | 获得/设置 设置文件格式图标回调委托 | -| ShowFooter | `bool` | - | 获得/设置 是否显示 Footer 默认 false 不显示 | -| ShowUploadFileList | `bool` | true | 获得/设置 是否显示上传列表 默认 true | -| TextTemplate | `RenderFragment?` | - | 获得/设置 文字模板 默认 null | -| UploadIcon | `string?` | - | 获得/设置 图标 默认 null | -| UploadText | `string?` | - | 获得/设置 上传文字 默认 null | -| ValidStatusIcon | `string?` | - | 获得/设置 上传成功状态图标 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Upload/DropUpload.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/DropUpload.razor.cs) - -## Dropzone - -拖拽容器 - -### Type Parameters - -- `TItem` - Generic type parameter - -**Inherits from**: `IDisposable` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Accepts | `Func?` | - | 获得/设置 是否允许拖拽释放 | -| AllowsDrag | `Func?` | - | 获得/设置 当前节点是否允许被拖拽 | -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| CopyItem | `Func?` | - | 获得/设置 复制内容 | -| Items | `List?` | - | 获取/设置 拖拽列表 | -| ItemWrapperClass | `Func?` | - | 获得/设置 每个 Item 的特殊 class | -| MaxItems | `int?` | - | 获取/设置 最大数量 默认 null 不限制 | -| OnItemDrop | `EventCallback` | - | 获得/设置 返回放下的 Item | -| OnItemDropRejected | `EventCallback` | - | 获得/设置 当拖拽被禁止时调用 | -| OnItemDropRejectedByMaxItemLimit | `EventCallback` | - | 获得/设置 当拖拽因为数量超限被禁止时调用 | -| OnReplacedItemDrop | `EventCallback` | - | 获得/设置 返回被替换的 Item | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| OnItemDrop | `EventCallback` | 获得/设置 返回放下的 Item | -| OnItemDropRejected | `EventCallback` | 获得/设置 当拖拽被禁止时调用 | -| OnItemDropRejectedByMaxItemLimit | `EventCallback` | 获得/设置 当拖拽因为数量超限被禁止时调用 | -| OnReplacedItemDrop | `EventCallback` | 获得/设置 返回被替换的 Item | - -### Public Methods - -- `void Dispose()` - - Dispose 方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/DragDrap/Dropzone.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DragDrap/Dropzone.razor.cs) - -## Empty - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| Image | `string?` | - | 获得/设置 图片路径 默认为 null | -| Template | `RenderFragment?` | - | 获得/设置 自定义模板 | -| Text | `string?` | - | 获得/设置 空状态描述 默认为 无数据 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Empty/Empty.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Empty/Empty.razor.cs) - -## EnumFilter - -Enum filter component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | -| Type | `Type?` | - | 获得/设置 相关枚举类型 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/EnumFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/EnumFilter.razor.cs) - -## FileIcon - -Icon 图标组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Extension | `string?` | - | 获得/设置 文件类型扩展名 **[Required]** | -| BackgroundTemplate | `RenderFragment?` | - | 获得/设置 背景图模板 默认 null 使用内部内置的空文件 svg 图 | -| IconColor | `Color` | Color.Primary | 获得/设置 图标类型背景色 默认 Color.Primary | -| Size | `Size` | - | 获得/设置 图标大小 默认 Color.None | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/FileIcon/FileIcon.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/FileIcon/FileIcon.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/FileIcons.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/FileIcons.razor) - -## FileListUploadBase - -FileListUploadBase 基类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `UploadBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CancelIcon | `string?` | - | 获得/设置 取消图标 | -| DeleteIcon | `string?` | - | 获得/设置 删除按钮图标 | -| DownloadIcon | `string?` | - | 获得/设置 下载按钮图标 | -| OnCancel | `Func?` | - | 获得/设置 点击取消按钮回调此方法 默认 null | -| OnDownload | `Func?` | - | 获得/设置 点击下载按钮回调方法 默认 null | -| ShowDeleteButton | `bool` | - | 获得/设置 是否显示删除按钮 默认 false | -| ShowDownloadButton | `bool` | - | 获得/设置 是否显示下载按钮 默认 false | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Upload/FileListUploadBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/FileListUploadBase.cs) - -## FilterBase - -过滤器基类 - -**Inherits from**: `BootstrapModuleComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Count | `int` | - | 获得/设置 条件数量 | -| FieldKey | `string?` | - | 获得/设置 相关 Field 字段名称 | -| IsHeaderRow | `bool` | - | 获得/设置 是否为 HeaderRow 模式 默认 false | - - - -### Public Methods - -- `FilterKeyValueAction GetFilterConditions()` - - 获得过滤窗口的所有条件方法 -- `void Reset()` - - 重置过滤条件方法 -- `Task SetFilterConditionsAsync(FilterKeyValueAction filter)` - - 设置过滤集合方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/FilterBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/FilterBase.cs) - -## FilterLogicItem - -FilterLogicItem 组件用于选择过滤条件的逻辑运算符 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Logic | `FilterLogic` | - | 获得/设置 逻辑运算符 | -| LogicChanged | `EventCallback` | - | 获得/设置 逻辑运算符改变回调方法 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| LogicChanged | `EventCallback` | 获得/设置 逻辑运算符改变回调方法 | - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/FilterLogicItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/FilterLogicItem.razor.cs) - -## FilterProvider - -FilterProvider component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | Gets or sets the child content. Default is null. | -| ClearButtonText | `string?` | - | 获得/设置 重置按钮文本 | -| FilterButtonText | `string?` | - | 获得/设置 过滤按钮文本 | -| MinusIcon | `string?` | - | 获得/设置 减少过滤条件图标 | -| PlusIcon | `string?` | - | 获得/设置 增加过滤条件图标 | -| ShowMoreButton | `bool` | - | Gets or sets whether show the more button. Default is false. | -| Title | `string?` | - | Gets or sets the filter title. Default is null. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/FilterProvider.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/FilterProvider.razor.cs) - -## FlipClock - -FlipClock 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BackgroundColor | `string?` | - | 获得/设置 组件背景色 默认 null 未设置使用样式默认值 radial-gradient(ellipse at center, rgba(150, 150, 150, 1) 0%, rgba(89, 89, 89, 1) 100%); | -| CardBackgroundColor | `string?` | - | 获得/设置 组件卡片背景颜色 默认 null 未设置使用样式默认值 #333; | -| CardColor | `string?` | - | 获得/设置 组件卡片字体颜色 默认 null 未设置使用样式默认值 #ccc; | -| CardDividerColor | `string?` | - | 获得/设置 组件卡片分割线颜色 默认 null 未设置使用样式默认值 rgba(0, 0, 0, .4); | -| CardDividerHeight | `string?` | - | 获得/设置 组件卡片分割线高度 默认 null 未设置使用样式默认值 1px; | -| CardGroupMargin | `string?` | - | 获得/设置 组件卡片组间隔 默认 null 未设置使用样式默认值 20; | -| CardHeight | `string?` | - | 获得/设置 组件卡片高度 默认 null 未设置使用样式默认值 90px; | -| CardMargin | `string?` | - | 获得/设置 组件卡片间隔 默认 null 未设置使用样式默认值 5; | -| CardWidth | `string?` | - | 获得/设置 组件卡片宽度 默认 null 未设置使用样式默认值 60px; | -| FontSize | `string?` | - | 获得/设置 组件字体大小 默认 null 未设置使用样式默认值 80px; | -| Height | `string?` | - | 获得/设置 组件高度 默认 null 未设置使用样式默认值 200px; | -| OnCompletedAsync | `Func?` | - | 获得/设置 计时结束回调方法 默认 null | -| ShowDay | `bool` | - | 获得/设置 是否显示 Day 默认 false | -| ShowHour | `bool` | true | 获得/设置 是否显示 Hour 默认 true | -| ShowMinute | `bool` | true | 获得/设置 是否显示 Minute 默认 true | -| ShowMonth | `bool` | - | 获得/设置 是否显示 Month 默认 false | -| ShowSecond | `bool` | true | 获得/设置 是否显示 Second 默认 true | -| ShowYear | `bool` | - | 获得/设置 是否显示 Year 默认 false | -| StartValue | `TimeSpan?` | - | 获得/设置 倒计时或者计时的开始时间 默认 模式下生效 | -| ViewMode | `FlipClockViewMode` | - | 获得/设置 显示模式 默认 | - - - -### Public Methods - -- `Task OnCompleted()` - - 倒计时结束回调方法由 JSInvoke 调用 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/FlipClock/FlipClock.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/FlipClock/FlipClock.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/FlipClocks.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/FlipClocks.razor) - -## FloatingLabel - -FloatingLabel 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsGroupBox | `bool` | - | 获得/设置 是否为 GroupBox 样式 默认 false | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Input/FloatingLabel.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Input/FloatingLabel.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/FloatingLabels.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/FloatingLabels.razor) - -## Footer - -Footer 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 内容 | -| ShowGoto | `bool` | true | 获得/设置 是否显示 Goto 小组件 默认 true 显示 | -| Target | `string?` | - | 获得/设置 Footer 组件中返回顶端按钮控制的滚动条所在组件 设置 为 true 时生效 | -| Text | `string?` | - | 获得/设置 Footer 显示文字 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Footer/Footer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Footer/Footer.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Footers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Footers.razor) - -## Handwritten - -Handwritten 手写签名 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ClearButtonText | `string?` | - | 清除按钮文本 | -| Result | `string?` | - | 手写签名imgBase64字符串 | -| SaveButtonText | `string?` | - | 保存按钮文本 | -| HandwrittenBase64 | `EventCallback` | - | 手写结果回调方法 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| HandwrittenBase64 | `EventCallback` | 手写结果回调方法 | - -### Public Methods - -- `Task OnValueChanged(string val)` - - 保存结果 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Handwritten/Handwritten.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Handwritten/Handwritten.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Handwrittens.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Handwrittens.razor) - -## IdComponentBase - -自动生成客户端 ID 组件基类 - -**Inherits from**: `BootstrapComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Id | `string?` | - | 获得/设置 组件 id 属性 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs) - -## IFrame - -Frame component encapsulates the Html iframe element - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Data | `object?` | - | Gets or sets the data to be passed | -| OnPostDataAsync | `Func?` | - | Gets or sets Frame loads the data passed by the page | -| OnReadyAsync | `Func?` | - | Gets or sets Callback method after the page is loaded. | -| Src | `string?` | - | Gets or sets the URL of the webpage to be loaded in the Frame | - - - -### Public Methods - -- `Task PushData(object? data)` - - Method to push data -- `Task TriggerLoaded()` - - Called by JavaScript - - *[JSInvokable]* -- `Task TriggerPostData(object? data)` - - Called by JavaScript - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/IFrame/IFrame.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/IFrame/IFrame.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/IFrames.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/IFrames.razor) - -## ImagePreviewer - -图片预览组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| MinusIcon | `string?` | - | 获得/设置 缩小 Icon 图标 | -| NextIcon | `string?` | - | 获得/设置 下一张图片 Icon 图标 | -| PlusIcon | `string?` | - | 获得/设置 方法 Icon 图标 | -| PreviewList | `List?` | - | 获得/设置 预览大图链接集合 默认 null | -| PreviousIcon | `string?` | - | 获得/设置 上一张图片 Icon 图标 | -| RotateLeftIcon | `string?` | - | 获得/设置 向左旋转 Icon 图标 | -| RotateRightIcon | `string?` | - | 获得/设置 向右旋转 Icon 图标 | -| ZIndex | `int` | 2050 | 获得/设置 原生 z-index 属性 默认 2050 | -| ZoomSpeed | `double?` | - | 获得/设置 预览缩放速度 默认 null 未设置取 0.015 值 | - - - -### Public Methods - -- `Task Show(int index)` - - 显示图片 - -### Source - -- Component: [src/BootstrapBlazor/Components/ImagePreviewer/ImagePreviewer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ImagePreviewer/ImagePreviewer.razor.cs) - -## ImageViewer - -Image 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Url | `string?` | - | 获得/设置 图片 Url 默认 null 必填 **[Required]** | -| Alt | `string?` | - | 获得/设置 原生 alt 属性 默认 null 未设置 | -| ErrorTemplate | `RenderFragment?` | - | 获得/设置 错误模板 默认 null 未设置 | -| FileIcon | `string?` | - | 获得/设置 图片文件图标 | -| FitMode | `objectFitMode` | - | 获得/设置 原生 object-fit 属性 默认 fill 未设置 | -| HandleError | `bool` | - | 获得/设置 加载失败时是否显示错误占位符 默认 false | -| IsAsync | `bool` | - | 获得/设置 图片是否异步加载 | -| IsIntersectionObserver | `bool` | - | 获得/设置 是否交叉监听 默认 false | -| OnErrorAsync | `Func?` | - | 获得/设置 图片加载失败时回调方法 | -| OnLoadAsync | `Func?` | - | 获得/设置 图片加载成功时回调方法 | -| PlaceHolderTemplate | `RenderFragment?` | - | 获得/设置 占位模板 未设置 或者 正在加载时显示 默认 null 未设置 | -| PreviewIndex | `int` | 0 | 获得/设置 预览大图当前链接集合点开的索引 默认为 0 | -| PreviewList | `List?` | - | 获得/设置 预览大图链接集合 默认 null | -| ShowPlaceHolder | `bool` | - | 获得/设置 是否显示占位符 适用于大图片加载 默认 false | -| ZIndex | `int` | 2050 | 获得/设置 原生 z-index 属性 默认 2050 | -| ZoomSpeed | `double?` | - | 获得/设置 预览缩放速度 默认 null 未设置取 0.015 值 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/ImageViewer/ImageViewer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/ImageViewers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ImageViewers.razor) - -## IntersectionObserver - -可见检测组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoUnobserveWhenIntersection | `bool` | true | 获得/设置 可见后是否自动取消观察 默认 true 可见后自动取消观察提高性能 | -| AutoUnobserveWhenNotIntersection | `bool` | - | 获得/设置 不可见后是否自动取消观察 默认 false 不可见后自动取消观察提高性能 | -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| OnIntersecting | `Func?` | - | 获得/设置 已经交叉回调方法 | -| RootMargin | `string?` | - | Margin around the root. Can have values similar to the CSS margin property, e.g. "10px 20px 30px 40px" (top, right, bottom, left). The values can be percentages. This set of values serves to grow or shrink each side of the root element's bounding box before computing intersections. Defaults to all zeros. | -| Threshold | `string?` | - | Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed. If you only want to detect when visibility passes the 50% mark, you can use a value of 0.5. If you want the callback to run every time visibility passes another 25%, you would specify the array [0, 0.25, 0.5, 0.75, 1]. The default is 0 (meaning as soon as even one pixel is visible, the callback will be run). A value of 1.0 means that the threshold isn't considered passed until every pixel is visible. | -| UseElementViewport | `bool` | true | 获得/设置 是否使用元素视口作为根元素 默认为 true 使用当前元素作为根元素 The element that is used as the viewport for checking visibility of the target. Must be the ancestor of the target. Defaults to the browser viewport if value is false. Default value is true | - - - -### Public Methods - -- `Task TriggerIntersecting(IntersectionObserverEntry entry)` - - 交叉检测回调方法 由 JavaScript 调用 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/IntersectionObservers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/IntersectionObservers.razor) - -## IntersectionObserverItem - -检测交叉组件子组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserverItem.razor.cs) - -## Layout - -Layout 组件 - -**Inherits from**: `IHandlerException` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AdditionalAssemblies | `IEnumerable?` | - | 获得/设置 Gets or sets a collection of additional assemblies that should be searched for components that can match URIs. | -| AllowDragTab | `bool` | true | 获得/设置 是否允许拖动标签页 默认 true | -| BeforeTabContextMenuTemplate | `RenderFragment?` | - | Gets or sets the template of before tab context menu. Default is null. | -| ClickTabToNavigation | `bool` | true | 获得/设置 点击标签页是否切换地址栏 默认 true | -| CollapseBarTemplate | `RenderFragment?` | - | 获得/设置 收起展开按钮模板 | -| EnableErrorLogger | `bool?` | - | 获得/设置 是否开启全局异常捕获 默认 null 读取配置文件 EnableErrorLogger 值 | -| EnableErrorLoggerILogger | `bool?` | - | 获得/设置 是否启用日志记录功能 默认 null 启用 使用 设置值 | -| ErrorLoggerToastTitle | `string?` | - | 获得/设置 错误日志 弹窗标题 默认 null | -| ExcludeUrls | `IEnumerable?` | - | 获得/设置 排除地址支持通配符 | -| Footer | `RenderFragment?` | - | 获得/设置 Footer 模板 | -| FullscreenToolbarButtonIcon | `string?` | - | Gets or sets the full screen toolbar button icon string. Default is null. | -| FullscreenToolbarTooltipText | `string?` | - | Gets or sets the full screen toolbar button tooltip string. Default is null. | -| Header | `RenderFragment?` | - | 获得/设置 Header 模板 | -| IsAccordion | `bool` | - | 获得/设置 菜单手风琴效果 | -| IsCollapsed | `bool` | - | 获得/设置 侧边栏状态 | -| IsFixedFooter | `bool` | - | 获得/设置 是否固定 Footer 组件 | -| IsFixedHeader | `bool` | - | 获得/设置 是否固定 Header 组件 | -| IsFixedTabHeader | `bool` | - | 获得/设置 是否固定多标签 Header 默认 false | -| IsFullSide | `bool` | - | 获得/设置 侧边栏是否占满整个左侧 默认为 false | -| IsOnlyRenderActiveTab | `bool` | - | 获得/设置 是否仅渲染 Active 标签 | -| IsPage | `bool` | - | 获得/设置 是否为整页面布局 默认为 false | -| Main | `RenderFragment?` | - | 获得/设置 Main 模板 | -| MenuBarIcon | `string?` | - | 获得/设置 MenuBar 图标 | -| Menus | `IEnumerable?` | - | 获得/设置 侧边栏菜单集合 | -| NotAuthorized | `RenderFragment?` | - | 获得/设置 NotAuthorized 模板 默认 null NET6.0/7.0 有效 | -| NotAuthorizeUrl | `string` | "/Account/Login" | 获得/设置 未授权导航地址 默认为 "/Account/Login" Cookie 模式登录页 | -| NotFound | `RenderFragment?` | - | 获得/设置 NotFound 模板 默认 null NET6.0/7.0 有效 | -| NotFoundTabText | `string?` | - | 获得/设置 NotFound 标签文本 默认 null NET6.0/7.0 有效 | -| OnAuthorizing | `Func>?` | - | 获得/设置 授权回调方法多用于权限控制 | -| OnBeforeShowContextMenu | `Func>?` | - | Gets or sets before popup context menu callback. Default is null. | -| OnClickMenu | `Func?` | - | 获得/设置 点击菜单时回调委托方法 默认为 null | -| OnCloseTabItemAsync | `Func>?` | - | 获得/设置 关闭标签页前回调方法 | -| OnCollapsed | `Func?` | - | 获得/设置 收缩展开回调委托 | -| OnErrorHandleAsync | `Func?` | - | 获得/设置 自定义错误处理回调方法 | -| OnTabHeaderTextLocalizer | `Func?` | - | 获得/设置 Tab 标签头文本本地化回调方法 | -| OnToolbarRefreshCallback | `Func?` | - | Gets or sets the refresh toolbar button click event callback. Default is null. | -| OnUpdateAsync | `Func?` | - | 获得/设置 更新回调方法 默认 null | -| RefreshToolbarButtonIcon | `string?` | - | Gets or sets the refresh toolbar button icon string. Default is null. | -| RefreshToolbarTooltipText | `string?` | - | Gets or sets the refresh toolbar button tooltip string. Default is null. | -| Resource | `object?` | - | 获得/设置 AuthorizeRouteView 参数 | -| ShowCollapseBar | `bool` | - | 获得/设置 是否显示收缩展开 Bar 默认 false | -| ShowErrorLoggerToast | `bool?` | - | 获得/设置 是否显示 Error 提示弹窗 默认 null 使用 设置值 | -| ShowFooter | `bool` | - | 获得/设置 是否显示 Footer 模板 默认 false | -| ShowFullscreenToolbarButton | `bool` | true | Gets or sets whether show the full screen button. Default is true. | -| ShowGotoTop | `bool` | - | 获得/设置 是否显示返回顶端按钮 默认为 false 不显示 | -| ShowRefreshToolbarButton | `bool` | true | Gets or sets whether show the full screen button. Default is true. | -| ShowSplitBar | `bool` | - | 获得/设置 是否显示分割栏 默认 false 不显示 仅在 左右布局时有效 | -| ShowTabContextMenu | `bool` | - | Gets or sets whether enable tab context menu. Default is false. | -| ShowTabExtendButtons | `bool` | true | 获得/设置 标签是否显示扩展按钮 默认 true | -| ShowTabInHeader | `bool` | - | Gets or sets whether show the tab in header. Default is false. | -| ShowTabItemClose | `bool` | true | 获得/设置 标签是否显示关闭按钮 默认 true | -| ShowToolbar | `bool` | - | Gets or sets whether show the toolbar. Default is false. | -| Side | `RenderFragment?` | - | 获得/设置 Side 模板 | -| SidebarMaxWidth | `int?` | - | 获得/设置 侧边栏最大宽度 默认 null 未设置 | -| SidebarMinWidth | `int?` | - | 获得/设置 侧边栏最小宽度 默认 null 未设置 | -| SideWidth | `string?` | - | 获得/设置 侧边栏宽度,支持百分比,设置 0 时关闭宽度功能 默认值 300 | -| SkipAuthenticate | `bool` | - | 获得/设置 是否跳过认证逻辑 默认 false | -| TabContextMenuCloseAllIcon | `string?` | - | Gets or sets the icon of tab item context menu close all button. Default is null. | -| TabContextMenuCloseIcon | `string?` | - | Gets or sets the icon of tab item context menu close button. Default is null. | -| TabContextMenuCloseOtherIcon | `string?` | - | Gets or sets the icon of tab item context menu close other button. Default is null. | -| TabContextMenuRefreshIcon | `string?` | - | Gets or sets the icon of tab item context menu refresh button. Default is null. | -| TabContextMenuTemplate | `RenderFragment?` | - | Gets or sets the template of tab context menu. Default is null. | -| TabDefaultUrl | `string` | "" | 获得/设置 默认标签页 关闭所有标签页时自动打开此地址 默认 null 未设置 | -| TabStyle | `TabStyle` | - | Gets or sets the tab style. Default is . | -| ToolbarTemplate | `RenderFragment?` | - | Gets or sets the template of the toolbar button. Default is null. | -| TooltipText | `string?` | - | 获得/设置 鼠标悬停提示文字信息 | -| UseTabSet | `bool` | - | 获得/设置 是否右侧使用 Tab 组件 默认为 false 不使用 | -| IsCollapsedChanged | `EventCallback` | - | 获得/设置 侧边栏状态 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| IsCollapsedChanged | `EventCallback` | 获得/设置 侧边栏状态 | - -### Public Methods - -- `string GetId()` - - -- `Task HandlerException(Exception ex, RenderFragment errorContent)` - - -- `void Render(RenderFragment renderFragment)` - - -- `void SetCollapsed(int width)` - - 设置侧边栏收缩方法 客户端监控 window.onResize 事件回调此方法 - - *[JSInvokable]* -- `Task UpdateAsync(string key)` - - 调用 Update 回调方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Layout/Layout.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Layout/Layout.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Layouts.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Layouts.razor) - -## LayoutSplitBar - -LayoutSidebar 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ContainerSelector | `string?` | - | 获得/设置 容器选择器 默认 null 未设置 组件拖动后设置容器 style="--bb-layout-sidebar-width: 200px;" 用于宽度调整 | -| Max | `int?` | - | 获得/设置 最大宽度 默认 null 未设置 | -| Min | `int?` | - | 获得/设置 最小宽度 默认 null 未设置 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Layout/LayoutSplitBar.razor.cs) - -## Light - -指示灯组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Color | `Color` | Color.Success | 获得/设置 指示灯颜色 默认为 Success 绿色 | -| IsFlash | `bool` | - | 获得/设置 组件是否闪烁 默认为 false 不闪烁 | -| IsFlat | `bool` | - | 获得/设置 是否为平面图形 默认 false | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Light/Light.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Light/Light.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Lights.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Lights.razor) - -## Link - -Link 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Href | `string?` | - | 获得/设置 href 属性值 **[Required]** | -| Rel | `string?` | "stylesheet" | 获得/设置 Rel 属性值, 默认 stylesheet | -| Version | `string?` | - | 获得/设置 版本号 默认 null 自动生成 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/HtmlTag/Link.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/HtmlTag/Link.razor.cs) - -## ListGroup - -ListGroup 组件 - -### Type Parameters - -- `TItem` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| GetItemDisplayText | `Func?` | - | 获得/设置 获得条目显示文本内容回调方法 | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 Header 模板 默认 null | -| HeaderText | `string?` | - | 获得/设置 Header 文字 默认 null | -| Items | `List?` | - | 获得/设置 数据源集合 | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 Header 模板 默认 null | -| OnClickItem | `Func?` | - | 获得/设置 点击 List 项目回调方法 | -| OnDoubleClickItem | `Func?` | - | 获得/设置 双击 List 项目回调方法 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/ListGroup/ListGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ListGroup/ListGroup.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ListGroups.razor) - -## ListView - -ListView 组件基类 - -### Type Parameters - -- `TItem` - Generic type parameter - -**Inherits from**: `BootstrapComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 BodyTemplate **[Required]** | -| CollapsedGroupCallback | `Func?` | - | 获得/设置 首次渲染是否收缩回调委托 | -| Collapsible | `bool` | - | 获得/设置 是否可折叠 默认 false 需要开启分组设置 | -| EmptyTemplate | `RenderFragment?` | - | 获得/设置 无数据时模板 默认 null 未设置 | -| EmptyText | `string?` | - | 获得/设置 无数据时显示文字 默认 null 未设置使用资源文件设置文字 | -| FooterTemplate | `RenderFragment?` | - | 获得/设置 FooterTemplate 默认 null 未设置 设置值后 参数不起作用,请自行实现分页功能 | -| GroupHeaderTextCallback | `Func?` | - | 获得/设置 获得 值 默认 null 使用分组 Key.ToString() 方法获取 | -| GroupItemOrderCallback | `Func, IOrderedEnumerable>?` | - | 获得/设置 组内项目排序回调方法 默认 null | -| GroupName | `Func?` | - | 获得/设置 分组 Lambda 表达式 默认 null | -| GroupOrderCallback | `Func>, IOrderedEnumerable>>?` | - | 获得/设置 组排序回调方法 默认 null 使用内置 | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 CardHeard | -| Height | `string?` | - | 获得/设置 组件高度 默认 null 未设置高度 如:50% 100px 10rem 10vh 等 | -| IsAccordion | `bool` | - | 获得/设置 是否手风琴效果 默认 false 需要开启可收缩设置 | -| IsPagination | `bool` | - | 获得/设置 是否分页 默认为 false 不分页 设置 时分页功能自动被禁用 | -| IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | -| Items | `IEnumerable?` | - | 获得/设置 数据源 | -| OnCollapseChanged | `Func?` | - | 获得/设置 CollapseItem 展开收缩时回调方法 默认 false 需要开启可收缩设置 | -| OnListViewItemClick | `Func?` | - | 获得/设置 ListView组件元素点击时回调委托 | -| OnQueryAsync | `Func>>?` | - | 异步查询回调方法 | -| PageItems | `int` | 20 | 获得/设置 每页数据数量 默认 20 | - - - -### Public Methods - -- `Task QueryAsync(int pageIndex, bool triggerByPagination)` - - 查询按钮调用此方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/ListView/ListView.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ListView/ListView.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/ListViews.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ListViews.razor) - -## LoadMore - -加载更多组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CanLoading | `bool` | true | 获得/设置 是否可以加载更多数据 默认为 true | -| LoadingTemplate | `RenderFragment?` | - | 获得/设置 加载更多模板 默认 null | -| NoMoreTemplate | `RenderFragment?` | - | 获得/设置 没有更多数据时显示的模板 默认为 null | -| NoMoreText | `string?` | - | 获得/设置 没有更多数据提示信息 默认为 null 读取资源文件中的预设值 | -| OnLoadMoreAsync | `Func?` | - | 获得/设置 触底回调方法 为 true 时才触发此回调方法 | -| Threshold | `string` | "1" | 获得/设置 触底元素触发 阈值 默认为 1 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs) - -## Logout - -ListView 组件基类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AvatarRadius | `string?` | - | Gets or sets the avatar border radius. Default is null. | -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| DisplayName | `string?` | - | 获得/设置 组件当前用户显示名称 | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 组件 HeaderTemplate | -| ImageUrl | `string?` | - | 获得/设置 组件当前用户头像 | -| LinkTemplate | `RenderFragment?` | - | 获得/设置 组件 LinkTemplate | -| PrefixDisplayNameText | `string?` | - | 获得/设置 组件当前用户显示名称前置文本 默认 欢迎 | -| PrefixUserNameText | `string?` | - | 获得/设置 组件当前用户登录账号前置文本 默认 当前账号 | -| ShowUserName | `bool` | true | 获得/设置 是否显示用户名 默认 true 显示 | -| UserName | `string?` | - | 获得/设置 组件当前用户登录账号 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Logout/Logout.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Logout/Logout.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Logouts.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Logouts.razor) - -## LogoutLink - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Icon | `string?` | - | 获得/设置 图标 | -| Text | `string?` | - | 获得/设置 按钮文字 | -| Url | `string?` | - | 获得/设置 按钮文字 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Logout/LogoutLink.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Logout/LogoutLink.razor.cs) - -## Marquee - -Marquee 字幕滚动组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BackgroundColor | `string` | "#fff" | 获得/设置 组件值 背景颜色 默认 #fff 支持16进制和颜色名称 | -| Color | `string` | "#000" | 获得/设置 组件值 文本颜色 默认 #000 支持16进制和颜色名称 | -| Direction | `MarqueeDirection` | - | 获得/设置 组件值 滚动方向 默认 LeftToRight | -| Duration | `int` | 14 | 获得/设置 组件值 动画时间 默认 14s 值越小滚动越快 | -| FontSize | `int` | 72 | 获得/设置 组件值 文本大小 默认 72px | -| Text | `string?` | - | 获得/设置 组件值 显示文本 默认 Empty | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Marquee/Marquee.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Marquee/Marquee.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Marquees.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Marquees.razor) - -## MultiFilter - -多选过滤器组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AlwaysTriggerGetItems | `bool` | - | 获得 是否每次弹窗时均调用 回调方法,多用于动态填装过滤条件 | -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | -| LoadingTemplate | `RenderFragment?` | - | 获得/设置 Loading 模板 | -| OnGetItemsAsync | `Func>>?` | - | 获得 过滤项集合回调方法 适合动态给定数据源 | -| SearchPlaceHolderText | `string?` | - | 获得/设置 搜索栏占位符 默认 nul 使用资源文件中值 | -| SelectAllText | `string?` | - | 获得/设置 全选按钮文本 默认 nul 使用资源文件中值 | -| ShowSearch | `bool` | true | 获得/设置 是否显示搜索栏 默认 true | -| StringComparison | `stringComparison` | StringComparison.OrdinalIgnoreCase | Gets or sets the string comparison option used for filtering operations. Default is | - - - -### Public Methods - -- `Task TriggerGetItemsCallback()` - - JavaScript 回调方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/MultiFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/MultiFilter.razor.cs) - -## NetworkMonitorIndicator - -Represents a network monitor indicator with customizable tooltip settings. - -**Inherits from**: `IDisposable` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| PopoverPlacement | `Placement` | Placement.Top | 获得/设置 Popover 显示位置 默认为 Top | -| Title | `string?` | - | 获得/设置 Popover 弹窗标题 默认为 null | -| Trigger | `string?` | - | 获得/设置 Popover 触发方式 默认为 hover focus | - - - -### Public Methods - -- `void Dispose()` - - - -### Source - -- Component: [src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorIndicator.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/NetworkMonitor/NetworkMonitorIndicator.razor.cs) - -## NotSupportFilter - -NotSupportFilter component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| NotSupportedColumnFilterMessage | `string?` | - | 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/NotSupportFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/NotSupportFilter.razor.cs) - -## NullSwitch - -可为空布尔值组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| DefaultValueWhenNull | `bool` | - | 获得/设置 绑定值为空时的默认值 默认为 false | -| Height | `int` | 20 | 获得/设置 控件高度默认 20px | -| OffColor | `Color` | - | 获得/设置 关颜色 | -| OffInnerText | `string?` | - | 获得/设置 组件 Off 时内置显示文本 | -| OnColor | `Color` | Color.Success | 获得/设置 开颜色 | -| OnInnerText | `string?` | - | 获得/设置 组件 On 时内置显示文本 | -| ShowInnerText | `bool` | - | 获得/设置 是否显示内置文字 默认 false 显示 | -| Width | `int` | 40 | 获得/设置 组件宽度 默认 40 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Switch/NullSwitch.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Switch/NullSwitch.razor.cs) - -## NumberFilter - -NumberFilter component - -### Type Parameters - -- `TType` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/NumberFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/NumberFilter.razor.cs) - -## Pagination - -Pagination 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Alignment | `Alignment` | Alignment.Right | 获得/设置 对齐方式 默认 Alignment.Right | -| GotoNavigatorLabelText | `string?` | - | 获得/设置 Goto 导航标签显示文字 默认 导航到/Goto | -| GotoTemplate | `RenderFragment?` | - | 获得/设置 Goto 导航模板 默认 null | -| MaxPageLinkCount | `int` | 5 | 获得/设置 Page up/down 页码数量 默认 5 | -| NextEllipsisPageIcon | `string?` | - | 获得/设置 上一页图标 | -| NextPageIcon | `string?` | - | 获得/设置 下一页图标 | -| OnPageLinkClick | `Func?` | - | 点击页码时回调方法 参数是当前页码 | -| PageCount | `int` | - | 获得/设置 页码总数 | -| PageIndex | `int` | 1 | 获得/设置 当前页码 | -| PageInfoTemplate | `RenderFragment?` | - | 获得/设置 分页信息模板 默认 null | -| PageInfoText | `string?` | - | 获得/设置 显示分页信息文字 默认为 null | -| PrevEllipsisPageIcon | `string?` | - | 获得/设置 上一页图标 | -| PrevPageIcon | `string?` | - | 获得/设置 上一页图标 | -| ShowGotoNavigator | `bool` | - | 获得/设置 是否显示 Goto 跳转导航器 默认 false | -| ShowPageInfo | `bool` | true | 获得/设置 是否显示 分页信息 默认 true | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Pagination/Pagination.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Pagination/Pagination.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Paginations.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Paginations.razor) - -## PaginationItem - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 子组件 | -| Index | `int` | - | 获得/设置 当前页码 | -| IsActive | `bool` | - | 获得/设置 是否激活 默认 false | -| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认 false | -| OnClick | `EventCallback` | - | 点击页码时回调方法 参数是当前页码 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| OnClick | `EventCallback` | 点击页码时回调方法 参数是当前页码 | - -### Source - -- Component: [src/BootstrapBlazor/Components/Pagination/PaginationItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Pagination/PaginationItem.razor.cs) - -## Popover - -Popover 弹出窗组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Content | `string?` | - | 获得/设置 显示文字,复杂内容可通过 自定义 | -| ShowShadow | `bool` | true | 获得/设置 是否显示阴影 默认 true | -| Template | `RenderFragment?` | - | 获得/设置 内容模板 默认 null 设置值后 参数失效 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Popover/Popover.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Popover/Popover.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Popovers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Popovers.razor) - -## PopoverCompleteBase - -弹窗可悬浮组件基类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `BootstrapInputBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ClearIcon | `string?` | - | Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up. | -| CustomClass | `string?` | - | | -| Debounce | `int` | - | 获得/设置 防抖时间 默认为 0 即不开启 | -| IsClearable | `bool` | - | Gets or sets whether the select component is clearable. Default is false. | -| IsPopover | `bool` | - | | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 候选项模板 默认 null | -| NoDataTip | `string?` | - | 获得/设置 无匹配数据时显示提示信息 默认提示"无匹配数据" | -| Offset | `string?` | - | | -| OnSelectedItemChanged | `Func?` | - | 获得/设置 下拉菜单选择回调方法 默认 null | -| Placement | `Placement` | Placement.Bottom | | -| ScrollIntoViewBehavior | `ScrollIntoViewBehavior` | ScrollIntoViewBehavior.Smooth | 获得/设置 滚动行为 默认 | -| ShowShadow | `bool` | true | | -| SkipEnter | `bool` | - | 获得/设置 是否跳过 Enter 按键处理 默认 false | -| SkipEsc | `bool` | - | 获得/设置 是否跳过 Esc 按键处理 默认 false | - - - -### Public Methods - -- `Task TriggerBlur()` - - 触发 OnBlur 回调方法 由 Javascript 触发 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/AutoComplete/PopoverCompleteBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/AutoComplete/PopoverCompleteBase.cs) - -## Progress - -Progress 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Color | `Color` | Color.Primary | 获得/设置 颜色 默认为 Color.Primary | -| Height | `int?` | - | 获得/设置 控件高度 默认 null 未设置 | -| IsAnimated | `bool` | - | 获得/设置 是否动画 默认 false | -| IsShowValue | `bool` | - | 获得/设置 是否显示进度条值 默认 false | -| IsStriped | `bool` | - | 获得/设置 是否显示为条纹 默认 false | -| MidpointRounding | `MidpointRounding` | MidpointRounding.AwayFromZero | 获得/设置 保留小数点模式 默认为 AwayFromZero | -| Round | `int` | - | 获得/设置 进度值修约小数位数, 默认 0 (即保留为整数) | -| Text | `string?` | - | 获得/设置 进度标签文本 | -| Value | `double` | - | 获得/设置 组件进度值 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Progress/Progress.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Progress/Progress.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Progress.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Progress.razor) - -## QueryBuilder - -QueryBuilder 组件 - -### Type Parameters - -- `TModel` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Value | `FilterKeyValueAction?` | - | 获得/设置 过滤模型 实例值 **[Required]** | -| ChildContent | `RenderFragment?` | - | 获得/设置 模板 | -| GroupText | `string?` | - | 获得/设置 组合过滤条件文本 | -| HeaderTemplate | `RenderFragment?` | - | 获得/设置 Header 模板 默认 null | -| ItemText | `string?` | - | 获得/设置 过滤条件文本 | -| Logic | `FilterLogic` | - | 获得/设置 逻辑运算符 | -| MinusIcon | `string?` | - | 获得/设置 减少过滤条件图标 | -| PlusIcon | `string?` | - | 获得/设置 增加过滤条件图标 | -| RemoveIcon | `string?` | - | 获得/设置 移除过滤条件图标 | -| ShowHeader | `bool` | true | 获得/设置 是否显示 Header 区域 默认 true 显示 | -| ValueChanged | `EventCallback` | - | 获得/设置 Filter 回调方法 支持双向绑定 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 Filter 回调方法 支持双向绑定 | - -### Source - -- Component: [src/BootstrapBlazor/Components/QueryBuilder/QueryBuilder.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/QueryBuilder/QueryBuilder.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/QueryBuilders.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/QueryBuilders.razor) - -## QueryGroup - -QueryGroup 组件 - -**Inherits from**: `IDisposable` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| Logic | `FilterLogic` | - | 获得/设置 逻辑运算符 | - - - -### Public Methods - -- `void Dispose()` - - 释放资源 - -### Source - -- Component: [src/BootstrapBlazor/Components/QueryBuilder/QueryGroup.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/QueryBuilder/QueryGroup.razor.cs) - -## Radio - -Radio 单选框组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `Checkbox` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| GroupName | `string?` | - | 获得/设置 Radio 组名称一般来讲需要设置 默认为 null 未设置 **[Required]** | -| OnClick | `Func?` | - | 获得/设置 点击回调方法 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Radio/Radio.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Radio/Radio.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Radios.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Radios.razor) - -## RadioList - -单选框组合组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoSelectFirstWhenValueIsNull | `bool` | true | 获得/设置 未设置选中项时是否自动选择第一项 默认 true | -| IsAutoAddNullItem | `bool` | - | 获得/设置 值为可为空枚举类型时是否自动添加空值 默认 false 自定义空值显示文本请参考 | -| NullItemText | `string?` | - | 获得/设置 空值项显示文字 默认为 "" 是否自动添加空值请参考 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Radio/RadioList.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Radio/RadioList.razor.cs) - -## RadioListGeneric - -单选框组合组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `IModelEqualityComparer` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Color | `Color` | - | 获得/设置 按钮颜色 默认为 None 未设置 | -| CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 | -| IsAutoAddNullItem | `bool` | - | 获得/设置 值为可为空枚举类型时是否自动添加空值 默认 false 自定义空值显示文本请参考 | -| IsButton | `bool` | - | 获得/设置 是否为按钮样式 默认 false | -| IsVertical | `bool` | - | 获得/设置 是否为竖向排列 默认为 false | -| Items | `IEnumerable>?` | - | 获得/设置 数据源 | -| ItemTemplate | `RenderFragment>?` | - | 获得/设置 项模板 | -| ModelEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | -| NullItemText | `string?` | - | 获得/设置 空值项显示文字 默认为 "" 是否自动添加空值请参考 | -| OnSelectedChanged | `Func?` | - | 获得/设置 SelectedItemChanged 方法 | -| ShowBorder | `bool` | true | 获得/设置 是否显示边框 默认为 true | - - - -### Public Methods - -- `bool Equals(TValue? x, TValue? y)` - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Radio/RadioListGeneric.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Radio/RadioListGeneric.razor.cs) - -## Rate - -Rate 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsDisable | `bool` | - | 获得/设置 是否禁用 默认为 false | -| IsReadonly | `bool` | - | 获得/设置 是否只读 默认为 false | -| IsWrap | `bool` | - | 获得/设置 是否禁止换行 默认为 true | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 子项模板 | -| Max | `int` | 5 | 获得/设置 最大值 默认 5 | -| OnValueChanged | `Func?` | - | 获得/设置 组件值变化时回调委托 | -| ShowValue | `bool` | - | 获得/设置 是否显示 Value 默认为 false | -| StarIcon | `string?` | - | 获得/设置 选中图标 | -| UnStarIcon | `string?` | - | 获得/设置 未选中图标 | -| Value | `double` | - | 获得/设置 组件值 | -| ValueChanged | `EventCallback` | - | 获得/设置 组件值变化时回调委托 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 组件值变化时回调委托 | - -### Source - -- Component: [src/BootstrapBlazor/Components/Rate/Rate.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Rate/Rate.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Rates.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Rates.razor) - -## ReconnectorContent - -ReconnectorContent 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AutoReconnect | `bool` | true | 获得/设置 是否自动尝试重连 默认 true | -| ReconnectFailedTemplate | `RenderFragment?` | - | 获得/设置 ReconnectFailedTemplate 模板 | -| ReconnectingTemplate | `RenderFragment?` | - | 获得/设置 ReconnectingTemplate 模板 | -| ReconnectInterval | `int` | 5000 | 获得/设置 自动重连间隔 默认 5000 毫秒 最小值为 1000 毫秒 | -| ReconnectRejectedTemplate | `RenderFragment?` | - | 获得/设置 ReconnectRejectedTemplate 模板 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Reconnector/ReconnectorContent.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Reconnector/ReconnectorContent.razor.cs) - -## RenderTemplate - -RenderTemplate component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | Gets or sets the child component | -| OnRenderAsync | `Func?` | - | Gets or sets the callback delegate for the first load | - - - -### Public Methods - -- `void Render()` - - Render method - -### Source - -- Component: [src/BootstrapBlazor/Components/BaseComponents/RenderTemplate.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/BaseComponents/RenderTemplate.razor.cs) - -## Repeater - -Repeat 组件 - -### Type Parameters - -- `TItem` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ContainerTemplate | `RenderFragment?` | - | 获得/设置 容器模板 | -| EmptyTemplate | `RenderFragment?` | - | 获得/设置 正在加载模板 | -| EmptyText | `string?` | - | 获得/设置 无数据时提示信息 默认 null | -| Items | `IEnumerable?` | - | 获得/设置 数据源 | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 模板 | -| LoadingTemplate | `RenderFragment?` | - | 获得/设置 正在加载模板 | -| ShowEmpty | `bool` | true | 获得/设置 是否显示无数据信息 默认 true 显示 | -| ShowLoading | `bool` | true | 获得/设置 是否显示正在加载信息 默认 true 显示 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Repeater/Repeater.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Repeater/Repeater.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Repeaters.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Repeaters.razor) - -## Row - -Row 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| ColSpan | `int?` | - | 获得/设置 子 Row 跨父 Row 列数 默认为 null | -| ItemsPerRow | `ItemsPerRow` | - | 获得/设置 设置一行显示多少个子组件 | -| RowType | `RowType` | - | 获得/设置 设置行格式 默认 Row 布局 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Row/Row.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Row/Row.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Rows.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Rows.razor) - -## Script - -Script 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Src | `string?` | - | 获得/设置 src 属性值 **[Required]** | -| Version | `string?` | - | 获得/设置 版本号 默认 null 自动生成 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/HtmlTag/Script.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/HtmlTag/Script.razor.cs) - -## Scroll - -Scroll 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| Height | `string?` | - | 获得/设置 组件高度 | -| ScrollHoverWidth | `int?` | - | 获得/设置 滚动条 hover 状态下宽度 默认 null 未设置使用 配置类中的 | -| ScrollWidth | `int?` | - | 获得/设置 滚动条宽度 默认 null 未设置使用 配置类中的 | -| Width | `string?` | - | 获得/设置 组件宽度 | - - - -### Public Methods - -- `Task ScrollToBottom()` - - 滚动到底部 - -### Source - -- Component: [src/BootstrapBlazor/Components/Scroll/Scroll.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Scroll/Scroll.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Scrolls.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Scrolls.razor) - -## Search - -Search component - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ButtonTemplate | `RenderFragment>?` | - | Gets or sets the button template. Default is null. | -| ClearButtonColor | `Color` | Color.Primary | Gets or sets the color of clear button. Default is . | -| ClearButtonIcon | `string?` | - | Gets or sets the icon of clear button. Default is null. | -| ClearButtonText | `string?` | - | Gets or sets the text of clear button. Default is null. | -| IconTemplate | `RenderFragment>?` | - | Gets or sets the icon template. Default is null if not set. | -| IsTriggerSearchByInput | `bool` | true | Gets or sets whether the search is triggered by input. Default is true. If false, the search button must be clicked to trigger. | -| OnGetDisplayText | `Func?` | - | Gets or sets the callback method to get display text. Default is null, using ToString() method. | -| OnSearch | `Func>>?` | - | Gets or sets the callback delegate when the search button is clicked. | -| PrefixButtonTemplate | `RenderFragment>?` | - | Gets or sets the prefix button template. Default is null. | -| PrefixIcon | `string?` | - | Gets or sets the prefix icon. Default is null. | -| PrefixIconTemplate | `RenderFragment>?` | - | Gets or sets the prefix icon template. Default is null. | -| SearchButtonColor | `Color` | Color.Primary | Gets or sets the search button color. Default is . | -| SearchButtonIcon | `string?` | - | Gets or sets the search button icon. Default is null. | -| SearchButtonLoadingIcon | `string?` | - | Gets or sets the loading icon for the search button. Default is null. | -| SearchButtonText | `string?` | - | Gets or sets the search button text. Default is null. | -| ShowClearButton | `bool` | - | Gets or sets whether to show the clear button. Default is false. | -| ShowPrefixIcon | `bool` | - | Gets or sets whether to show the prefix icon. Default is false. | -| ShowSearchButton | `bool` | true | Gets or sets whether to show the search button. Default is true. | - - - -### Public Methods - -- `Task TriggerFilter(string val)` - - TriggerFilter method called by Javascript. - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Search/Search.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Search/Search.razor.cs) - -## Segmented - -Segmented 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 | -| IsBlock | `bool` | - | 获得/设置 是否充满父元素 默认 false | -| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认 false | -| Items | `IEnumerable>?` | - | 获得/设置 选项集合 默认 null | -| ItemTemplate | `RenderFragment>?` | - | 获得/设置 候选项模板 默认 null | -| OnValueChanged | `Func?` | - | 获得/设置 选中值改变后回调委托方法 默认 null | -| ShowTooltip | `bool` | - | 获得/设置 是否自动显示 Tooltip 默认 false | -| Size | `Size` | - | 获得/设置 组件大小 默认值 | -| Value | `TValue?` | - | 获得/设置 选中值 默认 null | -| ValueChanged | `EventCallback` | - | 获得/设置 选中值回调委托 默认 null | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 选中值回调委托 默认 null | - -### Public Methods - -- `Task TriggerClick(int index)` - - 点击 SegmentItem 节点 JavaScript 回调触发 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Segmented/Segmented.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Segmented/Segmented.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Segmenteds.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Segmenteds.razor) - -## ShieldBadge - -ShieldBadge component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Icon | `string?` | - | Gets or sets the icon. Default is null. | -| IconColor | `string?` | - | Gets or sets the icon color. Default is null. | -| Label | `string?` | - | Gets or sets the label of badge. Default is null. | -| LabelBackgroundColor | `string?` | - | Gets or sets the label background color. Default is null. | -| LabelColor | `string?` | - | Gets or sets the label color of badge. Default is null. | -| Radius | `int` | 3 | Gets or sets the badge radius. Default is 3. | -| Text | `string?` | - | Gets or sets the text of badge. Default is null. | -| TextBackgroundColor | `string?` | - | Gets or sets the text background color. Default is null. | -| TextColor | `string?` | - | Gets or sets the text color. Default is null. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Badge/ShieldBadge.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/ShieldBadges.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ShieldBadges.razor) - -## SkeletonBase - -骨架屏组件基类 - -**Inherits from**: `BootstrapComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Active | `bool` | true | 获得/设置 是否显示动画 默认为 true | -| Round | `bool` | true | 获得/设置 是否圆角 默认为 true | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Skeleton/SkeletonBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Skeleton/SkeletonBase.cs) - -## Slider - -Range 组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Max | `TValue?` | - | 获得/设置 最大值 默认为 null 未设置 | -| Min | `TValue?` | - | 获得/设置 最小值 默认为 null 未设置 | -| Step | `TValue?` | - | 获得/设置 步长 默认为 null 未设置 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Slider/Slider.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Slider/Slider.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Sliders.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Sliders.razor) - -## SpeechWave - -语音识别波形图组件 - -**Inherits from**: `IDisposable` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| OnTimeout | `Func?` | - | 获得/设置 倒计时结束时回调委托 | -| Show | `bool` | - | 获得/设置 是否显示波形图 默认 false | -| ShowUsedTime | `bool` | true | 获得/设置 是否显示已用时长 默认 true | -| TotalTime | `int` | 60 * 1000 | 获得/设置 总时长 默认 60 000 毫秒 | - - - -### Public Methods - -- `void Dispose()` - - Dispose 方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Speech/SpeechWave.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Speeches/SpeechWaves.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Speeches/SpeechWaves.razor) - -## Spinner - -Spinner 组件基类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Color | `Color` | - | 获得/设置 Spinner 颜色 默认 None 无设置 | -| Size | `Size` | - | 获得 / 设置 Spinner 大小 默认 None 无设置 | -| SpinnerType | `SpinnerType` | - | 获得/设置 Spinner 类型 默认为 Border | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Spinner/Spinner.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Spinner/Spinner.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Spinners.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Spinners.razor) - -## Split - -Split 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Basis | `string` | "50%" | 获得/设置 第一个窗格初始化位置占比 默认为 50% | -| FirstPaneMinimumSize | `string?` | - | 获得/设置 第一个窗格模板 支持任意单位如 10px 20% 5em 1rem 未提供单位时默认为 px | -| FirstPaneTemplate | `RenderFragment?` | - | 获得/设置 第一个窗格模板 | -| IsCollapsible | `bool` | - | 获取 是否开启折叠功能 默认 false | -| IsKeepOriginalSize | `bool` | true | 获得/设置 开启 后,恢复时是否保持原始大小 默认 true | -| IsVertical | `bool` | - | 获得/设置 是否垂直分割 | -| OnResizedAsync | `Func?` | - | 获得/设置 窗格尺寸改变时回调方法 可参阅 | -| SecondPaneMinimumSize | `string?` | - | 获得/设置 第一个窗格模板 | -| SecondPaneTemplate | `RenderFragment?` | - | 获得/设置 第二个窗格模板 支持任意单位如 10px 20% 5em 1rem 未提供单位时默认为 px | -| ShowBarHandle | `bool` | true | 获取 是否显示拖动条 默认 true | - - - -### Public Methods - -- `Task SetLeftWidth(string leftWidth)` - - 设置左侧窗格宽度 -- `Task TriggerOnResize(string left)` - - 窗格折叠时回调方法 由 JavaScript 调用 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Split/Split.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Split/Split.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Splits.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Splits.razor) - -## Stack - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AlignItems | `StackAlignItems` | - | 获得/设置 垂直布局模式 默认 StackAlignItems.Stretch | -| ChildContent | `RenderFragment?` | - | 获得/设置 内容 | -| IsReverse | `bool` | - | 获得/设置 是否反向布局 默认 false | -| IsRow | `bool` | - | 获得/设置 是否为行布局 默认 false | -| IsWrap | `bool` | - | 获得/设置 是否允许折行 默认 false | -| Justify | `StackJustifyContent` | - | 获得/设置 水平布局调整 默认 StackJustifyContent.Start | - - - -### Public Methods - -- `void AddItem(StackItem item)` - - 添加子项 -- `void RemoveItem(StackItem item)` - - 移除子项 - -### Source - -- Component: [src/BootstrapBlazor/Components/Stack/Stack.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Stack/Stack.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Stacks.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Stacks.razor) - -## StringFilter - -StringFilter component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | Gets or sets the filter candidate items. It is recommended to use static data to avoid performance loss. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/StringFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/StringFilter.razor.cs) - -## SvgIcon - -SvgIcon 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Name | `string?` | - | 获得/设置 图标名称 **[Required]** | -| Href | `string?` | - | 获得 图标地址 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Icon/SvgIcon.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Icon/SvgIcon.razor.cs) - -## SweetAlertBody - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| BodyTemplate | `RenderFragment?` | - | 获得/设置 显示内容模板 | -| ButtonTemplate | `RenderFragment?` | - | 获得/设置 按钮模板 | -| CancelButtonText | `string?` | - | 获得/设置 取消按钮文字 默认为 取消 | -| Category | `SwalCategory` | - | 获得/设置 弹窗类别默认为 Success | -| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 | -| CloseButtonText | `string?` | - | 获得/设置 关闭按钮文字 默认为 关闭 | -| ConfirmButtonIcon | `string?` | - | 获得/设置 确认按钮图标 | -| ConfirmButtonText | `string?` | - | 获得/设置 确认按钮文字 默认为 确认 | -| Content | `string?` | - | 获得/设置 显示内容 | -| FooterTemplate | `RenderFragment?` | - | 获得/设置 Footer 模板 | -| IsConfirm | `bool` | - | 获得/设置 是否为确认弹窗模式 默认为 false | -| OnCloseAsync | `Func?` | - | 获得/设置 关闭按钮回调方法 | -| OnConfirmAsync | `Func?` | - | 获得/设置 确认按钮回调方法 | -| ShowClose | `bool` | true | 获得/设置 是否显示关闭按钮 默认 true 显示 | -| ShowFooter | `bool` | - | 获得/设置 是否显示 Footer 默认 false 不显示 | -| Title | `string?` | - | 获得/设置 显示标题 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/SweetAlert/SweetAlertBody.razor.cs) - -## Switch - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Height | `int` | 20 | 获得/设置 控件高度默认 20px | -| OffColor | `Color` | - | 获得/设置 关颜色 | -| OffInnerText | `string?` | - | 获得/设置 组件 Off 时内置显示文本 | -| OnColor | `Color` | Color.Success | 获得/设置 开颜色 | -| OnInnerText | `string?` | - | 获得/设置 组件 On 时内置显示文本 | -| ShowInnerText | `bool` | - | 获得/设置 是否显示内置文字 默认 false 显示 | -| Width | `int` | 40 | 获得/设置 组件宽度 默认 40 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Switch/Switch.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Switch/Switch.razor.cs) - -## ThemeProvider - -ThemeProvider 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ActiveIcon | `string?` | - | 获得/设置 当前选中模式图标 默认 null | -| Alignment | `Alignment` | Alignment.Right | 获得/设置 下拉框对其方式 默认 Right | -| AutoModeIcon | `string?` | - | 获得/设置 自动模式图标 默认 null | -| AutoModeText | `string?` | - | 获得/设置 自动模式文本 默认 null 未设置使用本地化资源 | -| DarkModeIcon | `string?` | - | 获得/设置 暗黑模式图标 默认 null | -| DarkModeText | `string?` | - | 获得/设置 暗黑模式文本 默认 null 未设置使用本地化资源 | -| LightModeIcon | `string?` | - | 获得/设置 明亮模式图标 默认 null | -| LightModeText | `string?` | - | 获得/设置 明亮模式文本 默认 null 未设置使用本地化资源 | -| OnThemeChangedAsync | `Func?` | - | 获得/设置 主题切换回调方法 | -| ShowShadow | `bool` | true | 获得/设置 下拉框是否显示阴影效果 默认 true | -| ThemeValue | `ThemeValue` | ThemeValue.UseLocalStorage | 主题类型 | -| ThemeValueChanged | `EventCallback` | - | 主题类型改变回调方法 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ThemeValueChanged | `EventCallback` | 主题类型改变回调方法 | - -### Public Methods - -- `Task OnThemeChanged(ThemeValue name)` - - JavaScript 回调方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/ThemeProvider/ThemeProvider.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/ThemeProvider/ThemeProvider.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/ThemeProviders.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/ThemeProviders.razor) - -## Timeline - -时间线组件基类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsAlternate | `bool` | - | 获得/设置 是否左右交替出现 默认 false | -| IsLeft | `bool` | - | 获得/设置 内容是否出现在时间线左侧 默认为 false | -| IsReverse | `bool` | - | 获得/设置 是否反转 | -| Items | `IEnumerable?` | - | 获得/设置 绑定数据集 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Timeline/Timeline.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Timeline/Timeline.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Timelines.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Timelines.razor) - -## TimePicker - -TimePicker 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CancelButtonText | `string?` | - | 获得/设置 取消按钮显示文字 | -| ConfirmButtonText | `string?` | - | 获得/设置 确定按钮显示文字 | -| HasSeconds | `bool` | true | 获得/设置 是否显示秒 默认为 true | -| OnClose | `Func?` | - | 获得/设置 取消按钮回调委托 | -| OnConfirm | `Func?` | - | 获得/设置 确认按钮回调委托 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/TimePicker/TimePicker.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/TimePicker/TimePicker.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/TimePickers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/TimePickers.razor) - -## TimePickerCell - -时间选择滚轮单元组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| DownIcon | `string?` | - | 获得/设置 向下箭头图标 | -| UpIcon | `string?` | - | 获得/设置 向上箭头图标 | -| Value | `TimeSpan` | - | 获得/设置 组件值 | -| ViewMode | `TimePickerCellViewMode` | - | 获得/设置 时间选择框视图模式 | -| ValueChanged | `EventCallback` | - | 获得/设置 组件值变化时委托方法 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ValueChanged | `EventCallback` | 获得/设置 组件值变化时委托方法 | - -### Public Methods - -- `Task OnClickDown()` - - 下翻页按钮调用此方法 - - *[JSInvokable]* -- `Task OnClickUp()` - - 上翻页按钮调用此方法 - - *[JSInvokable]* -- `void OnHeightCallback(double height)` - - 计算单元格高度回调方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/TimePicker/TimePickerCell.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/TimePicker/TimePickerCell.razor.cs) - -## Timer - -Timer 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CancelText | `string?` | - | 获得/设置 取消按钮文字 | -| Icon | `string?` | - | 获得/设置 Alert 图标 | -| IsVibrate | `bool` | true | 获得/设置 倒计时结束时设备震动 | -| OnCancel | `Func?` | - | 获得/设置 取消时回调委托 | -| OnTimeout | `Func?` | - | 获得/设置 倒计时结束时回调委托 | -| PauseText | `string?` | - | 获得/设置 暂停按钮文字 | -| ResumeText | `string?` | - | 获得/设置 继续按钮文字 | -| StarText | `string?` | - | 获得/设置 取消按钮文字 | -| StrokeWidth | `int` | 6 | 获得/设置 进度条宽度 默认为 2 | -| Value | `TimeSpan` | - | 获得/设置 当前值 | -| Width | `int` | 300 | 获得/设置 文件预览框宽度 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Timer/Timer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Timer/Timer.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Timers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Timers.razor) - -## Toggle - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Color | `Color` | Color.Success | 获得/设置 组件颜色 默认为 Success 颜色 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Toggle/Toggle.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toggle/Toggle.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Toggles.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Toggles.razor) - -## ToggleBase - -Toggle 开关组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `ValidateBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| OffText | `string?` | - | 获得/设置 组件 Off 时显示文本 | -| OnText | `string?` | - | 获得/设置 组件 On 时显示文本 | -| Width | `int` | 120 | 获得/设置 组件宽度 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Toggle/ToggleBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toggle/ToggleBase.cs) - -## Toolbar - -Toolbar 组件用于显示工具栏内容 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | -| IsWrap | `bool` | - | 获得/设置 是否允许换行显示工具栏内容 默认 false | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Toolbar/Toolbar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toolbar/Toolbar.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Toolbars.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Toolbars.razor) - -## ToolbarItem - -ToolbarItem 组件用于在工具栏中添加子组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Toolbar/ToolbarItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Toolbar/ToolbarItem.razor.cs) - -## Tooltip - -Tooltip 组件 - -**Inherits from**: `ITooltip` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件 | -| CustomClass | `string?` | - | | -| Delay | `string?` | - | | -| FallbackPlacements | `string[]?` | - | 获得/设置 位置 默认为 null | -| GetTitleCallback | `Func>?` | - | 获得/设置 获得显示内容异步回调方法 默认 null | -| IsHtml | `bool` | - | | -| Offset | `string?` | - | 获得/设置 偏移量 默认为 null | -| Placement | `Placement` | Placement.Top | | -| Sanitize | `bool` | true | | -| Selector | `string?` | - | | -| Title | `string?` | - | | -| Trigger | `string?` | - | | - - - -### Public Methods - -- `Task Hide(int? delay)` - - 关闭 Tooltip 弹窗方法 -- `void SetParameters(string title, Placement placement, string? trigger, string? customClass, bool? isHtml, bool? sanitize, string? delay, string? selector, string? offset)` - - 设置参数方法 -- `Task Show(int? delay)` - - 显示 Tooltip 弹窗方法 -- `Task Toggle(int? delay)` - - 切换 Tooltip 弹窗当前状态方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Tooltip/Tooltip.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tooltip/Tooltip.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Tooltips.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Tooltips.razor) - -## TooltipWrapperBase - -TooltipWrapperBase 基类 - -**Inherits from**: `BootstrapModuleComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| TooltipPlacement | `Placement` | Placement.Top | 获得/设置 Tooltip 显示位置 默认为 Top | -| TooltipText | `string?` | - | 获得/设置 TooltipText 显示文字 默认为 null | -| TooltipTrigger | `string?` | - | 获得/设置 Tooltip 触发方式 默认为 hover focus | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Tooltip/TooltipWrapperBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tooltip/TooltipWrapperBase.cs) - -## Transition - -Transition 动画组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子内容 | -| Duration | `int` | - | 获得/设置 动画执行时长 单位毫秒 默认为 0 未生效 | -| OnTransitionEnd | `Func?` | - | 获得/设置 动画执行完成回调委托 | -| Show | `bool` | true | 获得/设置 是否显示动画 默认 true | -| TransitionType | `TransitionType` | TransitionType.FadeIn | 获得/设置 动画名称 默认 FadeIn | - - - -### Public Methods - -- `Task TransitionEndAsync()` - - 动画执行完毕结束异步方法 JSInvoke 调用 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Transition/Transition.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Transition/Transition.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Transitions.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Transitions.razor) - -## Typed - -TypedJs 组件类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| OnCompleteAsync | `Func?` | - | 获得/设置 打字结束回调方法 默认 null | -| Options | `TypedOptions?` | - | 获得/设置 组件配置 实例 默认 null | -| Text | `string?` | - | 获得/设置 组件显示文字 默认 null 未设置 | - - - -### Public Methods - -- `Task TriggerComplete()` - - 打字结束方法 由 Javascript 触发 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Typed/Typed.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Typed/Typed.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Typeds.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Typeds.razor) - -## UploadBase - -Upload 组件基类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `ValidateBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Accept | `string?` | - | 获得/设置 上传接收的文件格式 默认为 null 接收任意格式 | -| Capture | `string?` | - | 获得/设置 媒体捕获机制的首选面向模式,默认为 null | -| DefaultFileList | `List?` | - | 获得/设置 已上传文件集合,可用于组件初始化 | -| IsDirectory | `bool` | - | 获得/设置 是否上传整个目录 默认为 false | -| IsMultiple | `bool` | - | 获得/设置 是否允许多文件上传 默认 false 不允许 | -| MaxFileCount | `int?` | - | 获得/设置 最大上传个数 默认为 null | -| OnAllFileUploaded | `Func, Task>?` | - | 获得/设置 所有文件上传完毕回调方法 默认 null | -| OnChange | `Func?` | - | 获得/设置 点击浏览按钮时回调此方法,如果多文件上传此回调会触发多次 默认 null | -| OnDelete | `Func>?` | - | 获得/设置 点击删除按钮时回调此方法 默认 null | -| ShowProgress | `bool` | - | 获得/设置 是否显示上传进度 默认为 false | - - - -### Public Methods - -- `void Reset()` - - 清空上传列表方法 Clear the upload files collection. - -### Source - -- Component: [src/BootstrapBlazor/Components/Upload/UploadBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/UploadBase.cs) - -## UploadPreviewList - -UploadPreviewList component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CancelIcon | `string?` | - | 获得/设置 取消图标 | -| DeleteIcon | `string?` | - | 获得/设置 删除按钮图标 | -| DownloadIcon | `string?` | - | 获得/设置 下载按钮图标 | -| FileIconArchive | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconAudio | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconCode | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconDocx | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconExcel | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconFile | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconImage | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconPdf | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconPPT | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconVideo | `string?` | - | 获得/设置 Excel 类型文件图标 | -| FileIconZip | `string?` | - | 获得/设置 Excel 类型文件图标 | -| InvalidStatusIcon | `string?` | - | 获得/设置 上传失败状态图标 | -| IsDisabled | `bool` | - | Gets or sets the disable status of the upload list. | -| Items | `List?` | - | Gets or sets the collection of files to be uploaded. | -| LoadingIcon | `string?` | - | 获得/设置 浏览按钮图标 | -| OnCancel | `Func?` | - | Gets or sets the callback method for the cancel button click event. Default is null 获得/设置 点击取消按钮回调此方法 默认 null | -| OnDelete | `Func>?` | - | 获得/设置 点击删除按钮时回调此方法 默认 null | -| OnDownload | `Func?` | - | 获得/设置 点击下载按钮回调方法 默认 null | -| OnGetFileFormat | `Func?` | - | Gets or sets the upload file format callback method. | -| ShowDownloadButton | `bool` | - | 获得/设置 是否显示下载按钮 默认 false | -| ShowProgress | `bool` | - | Gets or sets a value indicating whether progress should be displayed during the operation. | -| ValidStatusIcon | `string?` | - | 获得/设置 上传成功状态图标 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Upload/UploadPreviewList.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Upload/UploadPreviewList.razor.cs) - -## ValidateBase - -支持客户端验证的文本框基类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `DisplayBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | -| OnValueChanged | `Func?` | - | 获得/设置 Value 改变时回调方法 | -| ParsingErrorMessage | `string?` | - | 获得/设置 类型转化失败格式化字符串 默认为 null | -| RequiredErrorMessage | `string?` | - | 获得/设置 必填项错误文本 默认为 null 未设置 | -| ShowRequired | `bool?` | - | 获得/设置 是否显示必填项标记 默认为 null 未设置 | -| SkipValidate | `bool` | - | 获得/设置 是否不进行验证 默认为 false | -| ValidateRules | `List?` | - | 获得/设置 自定义验证集合 | - - - -### Public Methods - -- `bool IsComplexValue(object? value)` - - -- `void SetDisable(bool disable)` - - 设置是否可用状态 -- `void SetLabel(string label)` - - 设置 Label 值 -- `void SetValue(TValue value)` - - 设置 Value 值 -- `Task ToggleMessage(IReadOnlyCollection results)` - - 显示/隐藏验证结果方法 -- `Task ValidatePropertyAsync(object? propertyValue, ValidationContext context, List results)` - - 属性验证方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Validate/ValidateBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Validate/ValidateBase.cs) - -## Waterfall - -Waterfall 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ItemMinHeight | `int` | 316 | 获得/设置 每一项最小宽度 默认 316 用于显示 loading 图标 | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 图片模板 默认为 null | -| ItemWidth | `int` | 216 | 获得/设置 每一项宽度 默认 216 | -| LoadTemplate | `RenderFragment?` | - | 获得/设置 加载模板 | -| OnClickItemAsync | `Func?` | - | 获得/设置 点击列表项回调方法 | -| OnRequestAsync | `Func>>?` | - | 获得/设置 请求数据回调方法 | -| Template | `RenderFragment<(WaterfallItem Item, RenderFragment Context)>?` | - | 获得/设置 模板 默认为 null | - - - -### Public Methods - -- `Task OnClickItem(WaterfallItem item)` - - 点击图片回调方法 - - *[JSInvokable]* -- `Task OnloadAsync(WaterfallItem? item)` - - 请求数据回调方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Waterfall/Waterfall.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Waterfall/Waterfall.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Tutorials/Waterfall.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Tutorials/Waterfall.razor) - -## Watermark - -Watermark 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 **[Required]** | -| Color | `string?` | - | 获得/设置 颜色 默认 null 未设置 | -| FontSize | `int?` | - | 获得/设置 字体大小 默认 null 未设置 默认使用 16px 字体大小 单位 px | -| Gap | `int?` | - | 获得/设置 水印之间的间距 值 默认 null | -| IsPage | `bool` | - | 获得/设置 是否为整页面水印 默认 false | -| Rotate | `int?` | - | 获得/设置 水印的旋转角度 默认 null 45° | -| Text | `string?` | - | 获得/设置 水印文本 默认 BootstrapBlazor | -| ZIndex | `int?` | - | 获得/设置 水印元素的 z-index 值 默认 null | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Watermark/Watermark.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Watermarks.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Watermarks.razor) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-select.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-select.txt deleted file mode 100644 index 30eb5d99c0f..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-select.txt +++ /dev/null @@ -1,807 +0,0 @@ -# BootstrapBlazor Selection Components - -> Auto-generated parameter reference for select components - -## Components - -- [AutoComplete](#autocomplete) -- [Cascader](#cascader) -- [Dropdown](#dropdown) -- [DropdownItem](#dropdownitem) -- [DropdownWidget](#dropdownwidget) -- [MultiSelect](#multiselect) -- [MultiSelectFilter](#multiselectfilter) -- [MultiSelectGeneric](#multiselectgeneric) -- [NavbarDropdown](#navbardropdown) -- [NavbarDropdownItem](#navbardropdownitem) -- [PopoverDropdownBase](#popoverdropdownbase) -- [PopoverSelectBase](#popoverselectbase) -- [Select](#select) -- [SelectBase](#selectbase) -- [SelectGeneric](#selectgeneric) -- [SelectObject](#selectobject) -- [SelectTree](#selecttree) -- [SimpleSelectBase](#simpleselectbase) -- [SubCascader](#subcascader) -- [Transfer](#transfer) -- [TransferPanel](#transferpanel) - -## AutoComplete - -AutoComplete component - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| DisplayCount | `int?` | - | Gets or sets the number of items to display when matching data | -| Icon | `string?` | - | Gets or sets the icon | -| IgnoreCase | `bool` | true | Gets or sets whether to ignore case when matching, default is true | -| IsLikeMatch | `bool` | - | Gets or sets whether to enable fuzzy search, default is false | -| Items | `IEnumerable?` | - | Gets or sets the collection of matching data obtained by inputting a string | -| LoadingIcon | `string?` | - | Gets or sets the loading icon | -| OnCustomFilter | `Func>>?` | - | Gets or sets custom collection filtering rules, default is null | -| ShowDropdownListOnFocus | `bool` | true | Gets or sets whether to expand the dropdown candidate menu when focused, default is true | -| ShowNoDataTip | `bool` | true | Gets or sets whether to show the no matching data option, default is true | - - - -### Public Methods - -- `void TriggerChange(string v)` - - 支持双向绑定 由客户端 JavaScript 触发 - - *[JSInvokable]* -- `Task TriggerClear()` - - 点击清空按钮时调用此方法 由 Javascript 触发 - - *[JSInvokable]* -- `Task TriggerFilter(string val)` - - TriggerFilter method - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/AutoComplete/AutoComplete.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/AutoCompletes.razor) - -## Cascader - -Cascader 组件实现类 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ClearIcon | `string?` | - | 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up | -| Color | `Color` | Color.None | 获得/设置 按钮颜色 | -| Icon | `string?` | - | 获得/设置 菜单指示图标 | -| IsClearable | `bool` | - | 获得/设置 是否可清除 默认 false | -| Items | `IEnumerable?` | - | 获得/设置 绑定数据集 | -| OnBlurAsync | `Func?` | - | 获得/设置 失去焦点回调方法 默认 null | -| OnClearAsync | `Func?` | - | 获得/设置 清除文本内容 OnClear 回调方法 默认 null | -| OnSelectedItemChanged | `Func?` | - | 获得/设置 ValueChanged 方法 | -| ParentSelectable | `bool` | true | 获得/设置 父节点是否可选择 默认 true | -| PlaceHolder | `string?` | - | 获得/设置 组件 PlaceHolder 文字 默认为 请选择 ... | -| ShowFullLevels | `bool` | true | 获得/设置 是否显示全路径 默认 true | -| SubMenuIcon | `string?` | - | 获得/设置 子菜单指示图标 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Cascader/Cascader.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Cascader/Cascader.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Cascaders.razor) - -## Dropdown - -Dropdown 下拉框组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ButtonTemplate | `RenderFragment?` | - | 获得/设置 按钮内容模板 | -| Color | `Color` | Color.Primary | 获得/设置 颜色 默认 Color.Primary 无设置 | -| Direction | `Direction` | - | 获得/设置 下拉选项方向 默认 Dropdown 向下 | -| FixedButtonText | `string?` | - | 获得/设置 固定按钮显示文字 默认 null | -| Icon | `string?` | - | 获得/设置 显示图标 | -| IsAsync | `bool` | - | 获得/设置 是否为异步按钮,默认为 false 如果为 true 表示是异步按钮,点击按钮后禁用自身并且等待异步完成,过程中显示 loading 动画 为 true 时生效 | -| IsFixedButtonText | `bool` | - | 获得/设置 是否固定按钮文字 更改下拉框选项时按钮文字保持不变 默认 false 不固定 | -| IsKeepDisabled | `bool` | - | 获得/设置 是否异步结束后是否保持禁用状态,默认为 false | -| Items | `IEnumerable?` | - | 获得/设置 绑定数据集 | -| ItemsTemplate | `RenderFragment?` | - | 获得/设置 Items 模板 默认 null | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 选项模板 | -| LoadingIcon | `string?` | - | 获得/设置 正在加载动画图标 默认为 fa-solid fa-spin fa-spinner | -| MenuAlignment | `Alignment` | - | 获得/设置 获取菜单对齐方式 默认 none 未设置 | -| OnClickWithoutRender | `Func?` | - | 获得/设置 OnClick 事件不刷新父组件 为 true 时生效 | -| OnSelectedItemChanged | `Func?` | - | SelectedItemChanged 回调方法 | -| ShowFixedButtonTextInDropdown | `bool` | - | 获得/设置 下拉菜单中是否显示固定文字 默认 false 不显示 | -| ShowSplit | `bool` | - | 获得/设置 是否开启分裂式 默认 false | -| Size | `Size` | - | 获得/设置 组件尺寸 默认 none 未设置 | -| OnClick | `EventCallback` | - | 获得/设置 OnClick 事件 为 true 时生效 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| OnClick | `EventCallback` | 获得/设置 OnClick 事件 为 true 时生效 | - -### Source - -- Component: [src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dropdown/Dropdown.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Dropdowns.razor) - -## DropdownItem - -DropdownItem 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 组件内容 | -| Disabled | `bool` | - | 获得/设置 是否被禁用 默认 false 优先级低于 | -| Icon | `string?` | - | 获得/设置 图标 | -| OnClick | `Func?` | - | 获得/设置 点击回调方法 默认 null | -| OnDisabledCallback | `Func?` | - | 获得/设置 是否被禁用回调方法 默认 null 优先级高于 | -| Text | `string?` | - | 获得/设置 显示文本 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Dropdown/DropdownItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Dropdown/DropdownItem.razor.cs) - -## DropdownWidget - -DropdownWidget 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 选项模板支持静态数据 | -| Items | `IEnumerable?` | - | 获得/设置 挂件数据集合 | -| OnItemCloseAsync | `Func?` | - | 获得/设置 下拉项关闭回调方法 | -| OnItemShownAsync | `Func?` | - | 获得/设置 下拉项关闭回调方法 | - - - -### Public Methods - -- `Task TriggerStateChanged(int index, bool shown)` - - Widget 下拉项关闭回调方法 由 JavaScript 调用 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/DropdownWidget/DropdownWidget.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DropdownWidget/DropdownWidget.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/DropdownWidgets.razor) - -## MultiSelect - -MultiSelect component - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ButtonTemplate | `RenderFragment?` | - | 获得/设置 扩展按钮模板 | -| ClearText | `string?` | - | 获得/设置 全选按钮显示文本 | -| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 默认为 null | -| DefaultVirtualizeItemText | `string?` | - | Gets or sets the default virtualize items text. | -| DisplayTemplate | `RenderFragment>?` | - | 获得/设置 显示部分模板 默认 null | -| EditSubmitKey | `EditSubmitKey` | - | 获得/设置 编辑提交按键 默认 Enter | -| IsFixedHeight | `bool` | - | 获得/设置 是否固定高度 默认 false | -| IsSingleLine | `bool` | - | 获得/设置 是否为单行模式 默认 false | -| Max | `int` | - | 获得/设置 选项最大数 默认为 0 不限制 | -| MaxErrorMessage | `string?` | - | 获得/设置 设置最大值时错误消息文字 | -| Min | `int` | - | 获得/设置 选项最小数 默认为 0 不限制 | -| MinErrorMessage | `string?` | - | 获得/设置 设置最小值时错误消息文字 | -| OnEditCallback | `Func>?` | - | 获得/设置 编辑模式下输入选项更新后回调方法 默认 null 返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 | -| OnSelectedItemsChanged | `Func, Task>?` | - | 获得/设置 选中项集合发生改变时回调委托方法 | -| ReverseSelectText | `string?` | - | 获得/设置 全选按钮显示文本 | -| SelectAllText | `string?` | - | 获得/设置 全选按钮显示文本 | -| ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 默认为 true 显示 | -| ShowDefaultButtons | `bool` | true | 获得/设置 是否显示默认功能按钮 默认为 true 显示 | -| ShowToolbar | `bool` | - | 获得/设置 是否显示功能按钮 默认为 false 不显示 | - - - -### Public Methods - -- `Task Clear()` - - 清除选择项方法 -- `Task ConfirmSelectedItem(int index)` - - 客户端回车回调方法 - - *[JSInvokable]* -- `Task InvertSelect()` - - 翻转选择项方法 -- `Task SelectAll()` - - 全选选择项方法 -- `Task ToggleRow(string val)` - - 切换当前选项方法 - - *[JSInvokable]* -- `Task TriggerEditTag(string val)` - - 客户端编辑提交数据回调方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor) - -## MultiSelectFilter - -多项选择下拉框过滤组件 - -### Type Parameters - -- `TType` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `List?` | - | Gets or sets the filter items. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/MultiSelectFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/MultiSelectFilter.razor.cs) - -## MultiSelectGeneric - -MultiSelectGeneric component - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `IModelEqualityComparer` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ButtonTemplate | `RenderFragment?` | - | 获得/设置 扩展按钮模板 | -| ClearText | `string?` | - | 获得/设置 全选按钮显示文本 | -| CloseButtonIcon | `string?` | - | 获得/设置 关闭按钮图标 默认为 null | -| CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 | -| DefaultVirtualizeItemText | `string?` | - | Gets or sets the default virtualize items text. | -| DisplayTemplate | `RenderFragment>>?` | - | 获得/设置 显示部分模板 默认 null | -| EditSubmitKey | `EditSubmitKey` | - | 获得/设置 编辑提交按键 默认 Enter | -| IsFixedHeight | `bool` | - | 获得/设置 是否固定高度 默认 false | -| IsSingleLine | `bool` | - | 获得/设置 是否为单行模式 默认 false | -| Items | `IEnumerable>?` | - | Gets or sets the items. | -| ItemTemplate | `RenderFragment>?` | - | Gets or sets the item template. | -| Max | `int` | - | 获得/设置 选项最大数 默认为 0 不限制 | -| MaxErrorMessage | `string?` | - | 获得/设置 设置最大值时错误消息文字 | -| Min | `int` | - | 获得/设置 选项最小数 默认为 0 不限制 | -| MinErrorMessage | `string?` | - | 获得/设置 设置最小值时错误消息文字 | -| OnEditCallback | `Func>?` | - | 获得/设置 编辑模式下输入选项更新后回调方法 默认 null 返回 实例时输入选项生效,返回 null 时选项不生效进行舍弃操作,建议在回调方法中自行提示 | -| OnQueryAsync | `Func>>>?` | - | Gets or sets the callback method for loading virtualized items. | -| OnSearchTextChanged | `Func>>?` | - | Gets or sets the callback method when the search text changes. | -| OnSelectedItemsChanged | `Func>, Task>?` | - | 获得/设置 选中项集合发生改变时回调委托方法 | -| ReverseSelectText | `string?` | - | 获得/设置 全选按钮显示文本 | -| SelectAllText | `string?` | - | 获得/设置 全选按钮显示文本 | -| ShowCloseButton | `bool` | true | 获得/设置 是否显示关闭按钮 默认为 true 显示 | -| ShowDefaultButtons | `bool` | true | 获得/设置 是否显示默认功能按钮 默认为 true 显示 | -| ShowToolbar | `bool` | - | 获得/设置 是否显示功能按钮 默认为 false 不显示 | -| ValueEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | - - - -### Public Methods - -- `Task Clear()` - - 清除选择项方法 -- `Task ConfirmSelectedItem(int index)` - - 客户端回车回调方法 - - *[JSInvokable]* -- `bool Equals(TValue? x, TValue? y)` - - -- `Task InvertSelect()` - - 翻转选择项方法 -- `Task SelectAll()` - - 全选选择项方法 -- `Task ToggleRow(string val)` - - 切换当前选项方法 - - *[JSInvokable]* -- `Task TriggerOnSearch(string searchText)` - - Triggers the search callback method. - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/SelectGeneric/MultiSelectGeneric.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/SelectGeneric/MultiSelectGeneric.razor.cs) - -## NavbarDropdown - -NavbarDropdown 组件用于在导航栏中创建下拉菜单 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | -| Direction | `Direction` | - | 获得/设置 下拉选项方向 默认 Dropdown 向下 | -| MenuAlignment | `Alignment` | - | 获得/设置 获取菜单对齐方式 默认 none 未设置 | -| Text | `string?` | - | 获得/设置 Dropdown 菜单标题文本 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Navbar/NavbarDropdown.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarDropdown.razor.cs) - -## NavbarDropdownItem - -NavbarDropdownItem 组件用于在导航栏下拉菜单中创建菜单项 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | 获得/设置 子组件模板 | -| Target | `string?` | - | 获得/设置 A 标签 target 参数 默认 null | -| Url | `string?` | - | 获得/设置 菜单项文本 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Navbar/NavbarDropdownItem.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Navbar/NavbarDropdownItem.razor.cs) - -## PopoverDropdownBase - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `ValidateBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CustomClass | `string?` | - | 获得/设置 自定义样式 参数 默认 null | -| Placement | `Placement` | Placement.Bottom | 获得/设置 弹窗位置 默认为 Bottom | -| ShowShadow | `bool` | true | 获得/设置 是否显示阴影 默认 true | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/DateTimePicker/PopoverDropdownBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/DateTimePicker/PopoverDropdownBase.cs) - -## PopoverSelectBase - -PopoverSelectBase 基类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `PopoverDropdownBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsPopover | `bool` | - | 获得/设置 是否使用 Popover 渲染下拉框 默认 false | -| Offset | `string?` | - | 获得/设置 弹窗偏移量 默认 [0, 10] | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Select/PopoverSelectBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/PopoverSelectBase.cs) - -## Select - -Select component - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `ISelect` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| DefaultVirtualizeItemText | `string?` | - | Gets or sets the default text for virtualized items. Default is null. | -| DisableItemChangedWhenFirstRender | `bool` | - | Gets or sets whether to disable the OnSelectedItemChanged callback method on first render. Default is false. | -| DisplayTemplate | `RenderFragment?` | - | Gets or sets the display template. Default is null. | -| IsAutoClearSearchTextWhenCollapsed | `bool` | - | Gets or sets whether auto clear the search text when dropdown closed. | -| IsUseDefaultItemWhenValueIsNull | `bool` | - | 获得/设置 值为 null 时是否使用第一个选项或者标记为 active 的候选项作为默认值 Gets or sets a value indicating Whether to use the first option or the candidate marked as active as the default value when the value is null | -| LookupService | `ILookupService?` | - | | -| LookupServiceData | `object?` | - | | -| LookupServiceKey | `string?` | - | | -| OnBeforeSelectedItemChange | `Func>?` | - | 获取/设置 选中项改变前的回调方法。返回 true 则改变选中项的值;否则选中项的值不变。 Gets or sets the callback method before the selected item changes. Returns true to change the selected item value; otherwise, the selected item value does not change. | -| OnCollapsed | `Func?` | - | Gets or sets the dropdown collapsed callback method. | -| OnInputChangedCallback | `Func?` | - | Gets or sets the callback method when the input value changes. Default is null. | -| OnSelectedItemChanged | `Func?` | - | Gets or sets the callback method when the selected item changes. | -| Options | `RenderFragment?` | - | Gets or sets the options template for static data. | -| ShowSwal | `bool` | - | Gets or sets whether to show the Swal confirmation popup. Default is false. 获得/设置 是否显示 Swal 确认弹窗 默认值 为 false | -| SwalCategory | `SwalCategory` | SwalCategory.Question | Gets or sets the Swal category. Default is Question. | -| SwalContent | `string?` | - | Gets or sets the Swal content. Default is null. | -| SwalFooter | `string?` | - | Gets or sets the Swal footer. Default is null. | -| SwalTitle | `string?` | - | Gets or sets the Swal title. Default is null. | - - - -### Public Methods - -- `void Add(SelectedItem item)` - - -- `Task ConfirmSelectedItem(int index)` - - Confirms the selected item. - - *[JSInvokable]* -- `Task TriggerCollapsed()` - - Trigger event callback method. called by JavaScript. - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Select/Select.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/Select.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Selects.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Selects.razor) - -## SelectBase - -SelectBase component base class - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `PopoverSelectBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ClearIcon | `string?` | - | Gets or sets the right-side clear icon. Default is fa-solid fa-angle-up. | -| Color | `Color` | - | Gets or sets the color. The default is (no color). | -| DropdownIcon | `string?` | - | Gets or sets the dropdown icon. The default is "fa-solid fa-angle-up". | -| GroupItemTemplate | `RenderFragment?` | - | Gets or sets the group item template. | -| IsClearable | `bool` | - | Gets or sets whether the select component is clearable. Default is false. | -| IsMarkupString | `bool` | - | Gets or sets a value indicating whether the content is a . The default is false. | -| IsVirtualize | `bool` | - | Gets or sets whether virtual scrolling is enabled. Default is false. | -| NoSearchDataText | `string?` | - | Gets or sets the text to display when no search results are found. | -| OnClearAsync | `Func?` | - | Gets or sets the callback method when the clear button is clicked. Default is null. | -| OverscanCount | `int` | 4 | Gets or sets the overscan count for virtual scrolling. Default is 4. | -| PlaceHolder | `string?` | - | Gets or sets the placeholder text. | -| RowHeight | `float` | 33f | Gets or sets the row height for virtual scrolling. Default is 33. | -| ScrollIntoViewBehavior | `ScrollIntoViewBehavior` | ScrollIntoViewBehavior.Smooth | Gets or sets the scroll behavior. The default is . | -| SearchIcon | `string?` | - | Gets or sets the search icon. | -| SearchLoadingIcon | `string?` | - | Gets or sets the search loading icon. | -| ShowSearch | `bool` | - | Gets or sets a value indicating whether to show the search box. The default is false. | -| StringComparison | `stringComparison` | StringComparison.OrdinalIgnoreCase | Gets or sets the string comparison rule. The default is . | - - - -### Public Methods - -- `void ClearSearchText()` - - Clears the search text. -- `Task Hide()` - - Hides the dropdown. -- `Task Show()` - - Shows the dropdown. - -### Source - -- Component: [src/BootstrapBlazor/Components/Select/SelectBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SelectBase.cs) - -## SelectGeneric - -Select 泛型组件实现类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `ISelectGeneric` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为 用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断数据模型支持联合主键 | -| DisableItemChangedWhenFirstRender | `bool` | - | 获得/设置 禁止首次加载时触发 OnSelectedItemChanged 回调方法 默认 false | -| DisplayTemplate | `RenderFragment?>?` | - | 获得/设置 显示部分模板 默认 null | -| IsEditable | `bool` | - | 获得/设置 是否可编辑 默认 false | -| Items | `IEnumerable>?` | - | 获得/设置 绑定数据集 | -| ItemTemplate | `RenderFragment>?` | - | 获得/设置 选项模板 | -| OnBeforeSelectedItemChange | `Func, Task>?` | - | 获得/设置 下拉框项目改变前回调委托方法 返回 true 时选项值改变,否则选项值不变 | -| OnInputChangedCallback | `Func?` | - | 获得/设置 选项输入更新后回调方法 默认 null | -| OnQueryAsync | `Func>>>?` | - | 虚拟滚动数据加载回调方法 | -| OnSearchTextChanged | `Func>>?` | - | 获得/设置 搜索文本发生变化时回调此方法 | -| OnSelectedItemChanged | `Func, Task>?` | - | SelectedItemChanged 回调方法 | -| Options | `RenderFragment?` | - | 获得/设置 选项模板支持静态数据 | -| SwalCategory | `SwalCategory` | SwalCategory.Question | 获得/设置 Swal 图标 默认 Question | -| SwalContent | `string?` | - | 获得/设置 Swal 内容 默认 null | -| SwalFooter | `string?` | - | 获得/设置 Footer 默认 null | -| SwalTitle | `string?` | - | 获得/设置 Swal 标题 默认 null | -| TextConvertToValueCallback | `Func>?` | - | 获得/设置 选项输入更新后转换为 Value 回调方法 默认 null 返回值为 null 时放弃操作 | -| ValueEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | - - - -### Public Methods - -- `void Add(SelectedItem item)` - - 添加静态下拉项方法 -- `Task ConfirmSelectedItem(int index)` - - 客户端回车回调方法 - - *[JSInvokable]* -- `bool Equals(TValue? x, TValue? y)` - - -- `Task TriggerOnSearch(string searchText)` - - 客户端搜索栏回调方法 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SelectGenerics.razor) - -## SelectObject - -Select 组件实现类 - -### Type Parameters - -- `TItem` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment>?` | - | 获得/设置 下拉列表内容模板 **[Required]** | -| GetTextCallback | `Func?` | - | 获得 显示文字回调方法 默认 null **[Required]** | -| ClearIcon | `string?` | - | 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up | -| Color | `Color` | - | 获得/设置 颜色 默认 Color.None 无设置 | -| DropdownIcon | `string?` | - | 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up | -| DropdownMinWidth | `int?` | - | 获得/设置 弹窗最小宽度 默认为 null 未设置使用样式中的默认值 | -| Height | `int` | 486 | 获得/设置 弹窗高度 默认 486px; | -| IsClearable | `bool` | - | 获得/设置 是否可清除 默认 false | -| OnClearAsync | `Func?` | - | 获得/设置 清除文本内容 OnClear 回调方法 默认 null | -| PlaceHolder | `string?` | - | 获得 PlaceHolder 属性 | -| ShowAppendArrow | `bool` | true | 获得/设置 是否显示组件右侧扩展箭头 默认 true 显示 | -| Template | `RenderFragment?` | - | 获得/设置 Value 显示模板 默认 null | - - - -### Public Methods - -- `Task CloseAsync()` - - 关闭当前弹窗方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Select/SelectObject.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SelectObject.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/SelectObjects.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SelectObjects.razor) - -## SelectTree - -Select 组件实现类 - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `IModelEqualityComparer` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `List>?` | - | 获得/设置 带层次数据集合 **[Required]** | -| CanExpandWhenDisabled | `bool` | false | Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. | -| Color | `Color` | - | 获得/设置 颜色 默认 Color.None 无设置 | -| CustomKeyAttribute | `Type` | typeof(KeyAttribute) | | -| DropdownIcon | `string?` | - | 获得/设置 下拉箭头 Icon 图标 | -| IsEditable | `bool` | - | 获得/设置 是否可编辑 默认 false | -| ModelEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null | -| OnExpandNodeAsync | `Func, Task>>>?` | - | 获得/设置 点击节点获取子数据集合回调方法 | -| OnSelectedItemChanged | `Func?` | - | SelectedItemChanged 回调方法 | -| PlaceHolder | `string?` | - | 获得 PlaceHolder 属性 | -| ShowIcon | `bool` | - | 获得/设置 是否显示 Icon 图标 默认 false 不显示 | -| ShowResetSearchButton | `bool` | true | 获得/设置 是否显示重置搜索栏按钮 默认 true 显示 | -| ShowSearch | `bool` | - | 获得/设置 是否显示搜索栏 默认 false 不显示 | -| StringComparison | `stringComparison` | StringComparison.OrdinalIgnoreCase | 获得/设置 字符串比较规则 默认 StringComparison.OrdinalIgnoreCase 大小写不敏感 | - - - -### Public Methods - -- `bool Equals(TValue? x, TValue? y)` - - 比较数据是否相同 - -### Source - -- Component: [src/BootstrapBlazor/Components/Select/SelectTree.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SelectTree.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/SelectTrees.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SelectTrees.razor) - -## SimpleSelectBase - -SimpleSelectBase component base class - -### Type Parameters - -- `TValue` - Generic type parameter - -**Inherits from**: `SelectBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| IsEditable | `bool` | - | Gets or sets whether the select component is editable. Default is false. | -| Items | `IEnumerable?` | - | Gets or sets the items. | -| ItemTemplate | `RenderFragment?` | - | Gets or sets the item template. | -| OnQueryAsync | `Func>>?` | - | Gets or sets the callback method for loading virtualized items. | -| OnSearchTextChanged | `Func>?` | - | Gets or sets the callback method when the search text changes. | - - - -### Public Methods - -- `Task TriggerOnSearch(string searchText)` - - Triggers the search callback method. - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Select/SimpleSelectBase.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SimpleSelectBase.cs) - -## SubCascader - -SubCascader 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | 获得/设置 组件数据源 | -| OnClick | `Func?` | - | 获得/设置 选择项点击回调委托 | -| SubMenuIcon | `string?` | - | 获得/设置 子菜单指示图标 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Cascader/SubCascader.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Cascader/SubCascader.razor.cs) - -## Transfer - -穿梭框组件 - -### Type Parameters - -- `TValue` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | 获得/设置 组件绑定数据项集合 **[Required]** | -| Height | `string?` | - | 获得/设置 组件高度 默认值 null 未设置 | -| IsWrapItem | `bool` | true | 获得/设置 候选项是否为换行模式 默认 false 不换行 | -| IsWrapItemText | `bool` | - | 获得/设置 候选项文本是否为换行 默认 false 不换行 | -| ItemWidth | `string?` | - | 获得/设置 候选项宽度 默认 null 未设置 | -| LeftButtonText | `string?` | - | 获得/设置 左侧按钮显示文本 | -| LeftHeaderTemplate | `RenderFragment>?` | - | 获得/设置 左侧 Panel Header 模板 | -| LeftIcon | `string?` | - | 获得/设置 向左侧转移图标 | -| LeftItemTemplate | `RenderFragment?` | - | 获得/设置 左侧 Panel Item 模板 | -| LeftPanelSearchPlaceHolderString | `string?` | - | 获得/设置 左侧面板搜索框 placeholder 文字 | -| LeftPanelText | `string?` | - | 获得/设置 左侧面板 Header 显示文本 | -| Max | `int` | - | 获得/设置 右侧面板包含的最大数量, 默认为 0 不限制 | -| MaxErrorMessage | `string?` | - | 获得/设置 设置最大值时错误消息文字 | -| Min | `int` | - | 获得/设置 右侧面板包含的最大数量,默认为 0 不限制 | -| MinErrorMessage | `string?` | - | 获得/设置 设置最小值时错误消息文字 | -| OnSelectedItemsChanged | `Func, Task>?` | - | 获得/设置 选中项集合发生改变时回调委托方法 | -| OnSetItemClass | `Func?` | - | 获得/设置 数据样式回调方法 默认为 null | -| RightButtonText | `string?` | - | 获得/设置 右侧按钮显示文本 | -| RightHeaderTemplate | `RenderFragment>?` | - | 获得/设置 右侧 Panel Header 模板 | -| RightIcon | `string?` | - | 获得/设置 向右侧转移图标 | -| RightItemTemplate | `RenderFragment?` | - | 获得/设置 右侧 Panel Item 模板 | -| RightPanelSearchPlaceHolderString | `string?` | - | 获得/设置 右侧面板搜索框 placeholder 文字 | -| RightPanelText | `string?` | - | 获得/设置 右侧面板 Header 显示文本 | -| ShowSearch | `bool` | - | 获得/设置 是否显示搜索框 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Transfer/Transfer.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Transfers.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Transfers.razor) - -## TransferPanel - -TransferPanelBase 穿梭框面板组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| HeaderTemplate | `RenderFragment>?` | - | 获得/设置 Header 模板 | -| IsDisabled | `bool` | - | 获得/设置 是否禁用 默认为 false | -| Items | `List?` | - | 获得/设置 数据集合 | -| ItemTemplate | `RenderFragment?` | - | 获得/设置 Item 模板 | -| OnSelectedItemsChanged | `Func?` | - | 获得/设置 选项状态变化时回调方法 | -| OnSetItemClass | `Func?` | - | 获得/设置 数据样式回调方法 默认为 null | -| SearchIcon | `string?` | - | 获得/设置 搜索框图标 | -| SearchPlaceHolderString | `string?` | - | 获得/设置 搜索框的 placeholder 字符串 | -| ShowSearch | `bool` | - | 获得/设置 是否显示搜索框 | -| Text | `string?` | - | 获得/设置 面板显示文字 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Transfer/TransferPanel.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Transfer/TransferPanel.razor.cs) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-table.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-table.txt deleted file mode 100644 index 588873095dd..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-table.txt +++ /dev/null @@ -1,393 +0,0 @@ -# BootstrapBlazor Table Components - -> Auto-generated parameter reference for table components - -## Components - -- [SelectTable](#selecttable) -- [SkeletonTable](#skeletontable) -- [Table](#table) -- [TableAdvancedSortDialog](#tableadvancedsortdialog) -- [TableColumnFilter](#tablecolumnfilter) -- [TableExtensionButton](#tableextensionbutton) -- [TableFooterCell](#tablefootercell) -- [TableToolbar](#tabletoolbar) - -## SelectTable - -下拉表格组件实现类 - -### Type Parameters - -- `TItem` - Generic type parameter - -**Inherits from**: `IColumnCollection` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| GetTextCallback | `Func?` | - | 获得 显示文字回调方法 默认 null **[Required]** | -| OnQueryAsync | `Func>>?` | - | 异步查询回调方法 **[Required]** | -| AutoGenerateColumns | `bool` | - | 获得/设置 是否自动生成列信息 默认为 false | -| ClearIcon | `string?` | - | 获得/设置 右侧清除图标 默认 fa-solid fa-angle-up | -| CollapsedTopSearch | `bool` | - | 获得/设置 是否收缩顶部搜索框 默认为 false 不收缩搜索框 是否显示搜索框请设置 值 Top | -| Color | `Color` | - | 获得/设置 颜色 默认 Color.None 无设置 | -| CustomerSearchModel | `ITableSearchModel?` | - | 获得/设置 自定义搜索模型 | -| CustomerSearchTemplate | `RenderFragment?` | - | 获得/设置 自定义搜索模型模板 | -| DropdownIcon | `string?` | - | 获得/设置 右侧下拉箭头图标 默认 fa-solid fa-angle-up | -| EmptyTemplate | `RenderFragment?` | - | 获得/设置 无数据时显示模板 默认 null | -| Height | `int` | 486 | 获得/设置 表格高度 默认 486px | -| IsClearable | `bool` | - | 获得/设置 是否可清除 默认 false | -| IsPagination | `bool` | - | 获得/设置 是否分页 默认为 false | -| OnClearAsync | `Func?` | - | 获得/设置 清除文本内容 OnClear 回调方法 默认 null | -| PageItemsSource | `IEnumerable?` | - | 获得/设置 每页显示数据数量的外部数据源 | -| PlaceHolder | `string?` | - | 获得 PlaceHolder 属性 | -| SearchModel | `TItem` | new() | 获得/设置 SearchModel 实例 | -| SearchTemplate | `RenderFragment?` | - | 获得/设置 SearchTemplate 实例 | -| ShowAppendArrow | `bool` | true | 获得/设置 是否显示组件右侧扩展箭头 默认 true 显示 | -| ShowEmpty | `bool` | - | 获得/设置 是否显示无数据空记录 默认 false 不显示 | -| ShowSearch | `bool` | - | 获得/设置 是否显示搜索框 默认为 false 不显示搜索框 | -| TableColumns | `RenderFragment?` | - | 获得/设置 TableHeader 实例 | -| TableMinWidth | `int?` | - | 获得/设置 弹窗表格最小宽度 默认为 null 未设置使用样式中的默认值 | -| Template | `RenderFragment?` | - | 获得/设置 Value 显示模板 默认 null | - - - -### Public Methods - -- `Task QueryAsync()` - - 查询方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Select/SelectTable.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Select/SelectTable.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/SelectTables.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/SelectTables.razor) - -## SkeletonTable - -表格骨架屏组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Columns | `int` | 3 | 获得/设置 行数 默认 3 列 | -| Rows | `int` | 7 | 获得/设置 行数 默认 7 行 | -| ShowToolbar | `bool` | true | 获得/设置 是否显示工具栏 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Skeleton/SkeletonTable.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Skeleton/SkeletonTable.razor.cs) - -## Table - -Table 组件基类 - -### Type Parameters - -- `TItem` - Generic type parameter - -**Inherits from**: `ITable` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AlignCenterText | `string?` | - | 获得/设置 居中对齐显示文本 | -| AlignCenterTooltipText | `string?` | - | 获得/设置 居中对齐提示信息文本 | -| AlignLeftText | `string?` | - | 获得/设置 左对齐显示文本 | -| AlignLeftTooltipText | `string?` | - | 获得/设置左对齐提示信息文本 | -| AlignRightText | `string?` | - | 获得/设置 右对齐显示文本 | -| AlignRightTooltipText | `string?` | - | 获得/设置 右对齐提示信息文本 | -| AllowDragColumn | `bool` | - | 获得/设置 是否允许拖放标题栏更改栏位顺序,默认为 false | -| AllowResizing | `bool` | - | 获得/设置 是否允许列宽度调整 默认 false 固定表头时此属性生效 | -| AutoRefreshInterval | `int` | 2000 | 获得/设置 自动刷新时间间隔 默认 2000 毫秒 | -| AutoScrollLastSelectedRowToView | `bool` | - | 获得/设置 是否自动将选中行滚动到可视区域 默认 false | -| AutoScrollVerticalAlign | `ScrollToViewAlign` | ScrollToViewAlign.Center | 获得/设置 选中行滚动到可视区域对齐方式 默认 ScrollToViewAlign.Center | -| AutoSearchOnInput | `bool` | - | Gets or sets a value indicating whether automatic search functionality is enabled. Default value is false. | -| CheckboxColumnCompactWidth | `int` | - | 获得/设置 紧凑模式下复选框宽度 默认 28 | -| CheckboxColumnWidth | `int` | - | 获得/设置 复选框宽度 默认 36 | -| ClientTableName | `string?` | - | 获得/设置 客户端表格名称 默认 null 用于客户端列宽与列顺序持久化功能 | -| ColumnMinWidth | `int?` | - | 获得/设置 列最小宽度 默认 null 未设置 可通过 统一设置 | -| ColumnOrderCallback | `Func, IEnumerable>?` | - | 获得/设置 自定义列排序规则 默认 null 未设置 使用内部排序机制 1 2 3 0 -3 -2 -1 顺序 | -| ColumnToolboxIcon | `string?` | - | 获得/设置 列工具栏图标 fa-solid fa-gear | -| ColumnWidthTooltipPrefix | `string?` | - | 获得/设置 列调整提示前缀文字 默认 null 未设置使用资源文件中文字 | -| CopyColumnCopiedTooltipText | `string?` | - | 获得/设置 列拷贝完毕后 Tooltip 文字 | -| CopyColumnTooltipText | `string?` | - | 获得/设置 列拷贝 Tooltip 文字 | -| CustomKeyAttribute | `Type?` | typeof(KeyAttribute) | 获得/设置 数据主键标识标签 默认为
用于判断数据主键标签,如果模型未设置主键时可使用 参数自定义判断
数据模型支持联合主键 | -| DefaultFixedColumnWidth | `int` | 200 | 获得/设置 默认固定列宽度 默认 200 单位 px | -| DetailColumnWidth | `int` | - | 获得/设置 明细行 Row Header 宽度 默认 24 | -| DetailRowTemplate | `RenderFragment?` | - | 获得/设置 明细行模板 | -| DisableAddButtonCallback | `Func, bool>?` | - | 获得/设置 新建按钮是否禁用回调方法 默认 null 未设置 | -| DisableAutoSubmitFormByEnter | `bool?` | - | 获得/设置 是否禁用表单内回车自动提交功能 默认 null 未设置 | -| DisableDeleteButtonCallback | `Func, bool>?` | - | 获得/设置 删除按钮是否禁用回调方法 默认 null 未设置 | -| DisableEditButtonCallback | `Func, bool>?` | - | 获得/设置 编辑按钮是否禁用回调方法 默认 null 未设置 | -| DynamicContext | `IDynamicobjectContext?` | - | 获得/设置 动态数据上下文实例 | -| EditDialogItemsPerRow | `int` | 2 | 获得/设置 每行显示组件数量 默认为 2 | -| EditDialogLabelAlign | `Alignment` | - | 获得/设置 设置 Inline 模式下标签对齐方式 默认 None 等效于 Left 左对齐 | -| EditDialogRowType | `RowType` | RowType.Inline | 获得/设置 设置行内组件布局格式 默认 Inline 布局 | -| EmptyImage | `string?` | - | 获得/设置 无数据时显示图片路径 默认 null 未设置 | -| EmptyTemplate | `RenderFragment?` | - | 获得/设置 无数据时显示模板 默认 null | -| EmptyText | `string?` | - | 获得/设置 无数据时显示文本 默认取资源文件 英文 NoData 中文 无数据 | -| EnableKeyboardNavigationCell | `bool` | true | 获得/设置 是否启用 Excel 模式下的键盘导航功能 默认 true | -| FitColumnWidthIncludeHeader | `bool` | - | 获得/设置 列宽自适应时是否包含表头 默认 false | -| FooterTemplate | `RenderFragment>?` | - | 获得/设置 Table Footer 模板 | -| GetAdvancedSearchFilterCallback | `Func?>?` | - | 获得/设置 获得高级搜索条件回调方法 默认 null | -| HeaderStyle | `TableHeaderStyle` | TableHeaderStyle.None | 获取/设置 表格 thead 样式 ,默认为浅色 | -| HeaderTextWrap | `bool` | - | 获得/设置 是否表头允许折行 默认 false 不折行 此设置为 true 时覆盖 参数值 | -| Height | `int?` | - | 获得/设置 Table 高度 默认为 null | -| IsAccordion | `bool` | - | 获得/设置 明细行手风琴效果 默认 false | -| IsAutoQueryFirstRender | `bool` | true | 获得/设置 首次加载时是否自动查询数据 默认 true 模式下此参数不起作用 | -| IsAutoRefresh | `bool` | - | 获得/设置 是否自动刷新表格 默认为 false | -| IsAutoScrollTopWhenClickPage | `bool` | - | 获得/设置 翻页时是否自动滚动到顶部 默认 false | -| IsBordered | `bool` | - | 获得/设置 是否带边框样式 默认为 false | -| IsDetails | `bool?` | - | 获得/设置 是否显示明细行 默认为 null 为空时使用 进行逻辑判断 | -| IsExcel | `bool` | - | 获得/设置 组件工作模式为 Excel 模式 默认 false | -| IsFixedFooter | `bool` | - | 获得/设置 固定 Footer 默认 false | -| IsFixedHeader | `bool` | - | 获得/设置 固定表头 默认 false | -| IsGroupExtendButtons | `bool` | true | 获得/设置 是否使用按钮组显示行内扩展按钮 默认 true | -| IsHideFooterWhenNoData | `bool` | - | 获得/设置 无数据时是否隐藏表格 Footer 默认为 false 不隐藏 | -| IsPopoverToolbarDropdownButton | `bool` | - | 获得/设置 工具栏下拉框按钮是否 IsPopover 默认 false | -| IsStriped | `bool` | - | 获得/设置 是否斑马线样式 默认为 false | -| IsTracking | `bool` | - | 获得/设置 组件是否采用 Tracking 模式对编辑项进行直接更新 默认 false | -| Items | `IEnumerable?` | - | 获得/设置 数据集合,适用于无功能仅做数据展示使用,高级功能时请使用 回调委托 | -| LineNoColumnAlignment | `Alignment` | - | 获得/设置 行号内容位置 | -| LineNoColumnWidth | `int` | - | 获得/设置 行号列宽度 默认 60 | -| LoadingTemplate | `RenderFragment?` | - | 获得/设置 Loading 模板 | -| ModelEqualityComparer | `Func?` | - | 获得/设置 比较数据是否相同回调方法 默认为 null 提供此回调方法时忽略 属性 | -| MultiHeaderTemplate | `RenderFragment?` | - | 获得/设置 多表头模板 | -| NotSupportedColumnFilterMessage | `string?` | - | 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 | -| OnAfterRenderCallback | `Func, bool, Task>?` | - | 获得/设置 Table 组件渲染完毕回调 | -| OnAutoFitColumnWidthCallback | `Func>?` | - | 获得/设置 自动调整列宽回调方法 | -| OnBeforeRenderRow | `Action?` | - | 获得/设置 呈现每行之前的回调 | -| OnClickRowCallback | `Func?` | - | 获得/设置 单击行回调委托方法 | -| OnColumnCreating | `Func, Task>?` | - | 获得/设置 列创建时回调委托方法 | -| OnDoubleClickCellCallback | `Func?` | - | 获得/设置 双击单元格回调委托 | -| OnDoubleClickRowCallback | `Func?` | - | 获得/设置 双击行回调委托方法 | -| OnDragColumnEndAsync | `Func, Task>?` | - | 获得/设置 拖动列结束回调方法,默认 null 可存储数据库用于服务器端保持列顺序 | -| OnResizeColumnAsync | `Func?` | - | 获得/设置 设置列宽回调方法 | -| OnToggleDetailRowCallback | `Func?` | - | 获得/设置 展开收起明细行回调方法 第二个参数 true 时表示展开 false 时表示收起 | -| OverscanCount | `int` | 10 | Gets or sets the overscan count for virtual scrolling. Default is 10. | -| RowContentTemplate | `RenderFragment>?` | - | 获得/设置 行内容模板 | -| RowHeight | `float` | 38f | 获得/设置 虚拟滚动行高 默认为 38 | -| RowTemplate | `RenderFragment>?` | - | 获得/设置 行模板 | -| ScrollHoverWidth | `int?` | - | 获得/设置 滚动条 hover 状态下宽度 默认 null 未设置使用 配置类中的 | -| ScrollMode | `ScrollMode` | - | 获得/设置 数据滚动模式 | -| ScrollWidth | `int?` | - | 获得/设置 滚动条宽度 默认 null 未设置使用 配置类中的 | -| ShowCheckboxTextColumnWidth | `int` | - | 获得/设置 显示文字的复选框列宽度 默认 80 | -| ShowColumnWidthTooltip | `bool` | - | 获得/设置 是否显示列宽提示信息,默认 false 显示 | -| ShowCopyColumnTooltip | `bool` | true | 获得/设置 CopyColumn Tooltip 默认 true | -| ShowDetailRow | `Func?` | - | 获得/设置 是否显示每行的明细行展开图标 | -| ShowEmpty | `bool` | - | 获得/设置 是否显示无数据空记录 默认 false 不显示 | -| ShowFilterHeader | `bool` | - | 获得/设置 是否显示过滤表头 默认 false 不显示 | -| ShowFooter | `bool` | - | 获得/设置 是否显示表脚 默认为 false | -| ShowMultiFilterHeader | `bool` | - | 获得/设置 是否显示过滤表头 默认 false 不显示 | -| SortAscText | `string?` | - | 获得/设置 升序排序时 tooltip 显示文字 默认点击降序 | -| SortDescText | `string?` | - | 获得/设置 降序排序时 tooltip 显示文字 默认取消排序 | -| TableColumns | `RenderFragment?` | - | 获得/设置 TableHeader 实例 | -| TableFooter | `RenderFragment>?` | - | 获得/设置 TableFooter 实例 | -| TableSize | `TableSize` | - | 获得/设置 表格组件大小 默认为 Normal 正常模式 | -| UnsetText | `string?` | - | 获得/设置 未设置排序时 tooltip 显示文字 默认点击升序 | -| ItemsChanged | `EventCallback>` | - | 获得/设置 数据集合回调方法 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ItemsChanged | `EventCallback>` | 获得/设置 数据集合回调方法 | - -### Public Methods - -- `Task AutoFitColumnWidthCallback(string fieldName, float calcWidth)` - - 列宽自适应回调方法 由 JavaScript 脚本调用 - - *[JSInvokable]* -- `Task DragColumnCallback(int originIndex, int currentIndex)` - - 重置列方法 由 JavaScript 脚本调用 - - *[JSInvokable]* -- `Task ExpandDetailRow(TItem item)` - - 明细行功能中切换行状态时调用此方法 -- `Task FitAllColumnWidth()` - - 列宽自适应方法 -- `Task ResetFilters()` - - Reset all Columns Filter -- `Task ResetSortAsync()` - - Reset all Columns Sort -- `void ResetVisibleColumns(IEnumerable columns)` - - 设置 列可见方法 -- `Task ResizeColumnCallback(int index, float width)` - - 设置列宽方法 由 JavaScript 脚本调用 - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/Table/Table.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Table/Table.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/Table/Tables.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/Table/Tables.razor) - -## TableAdvancedSortDialog - -Table 高级排序弹窗的内容组件 - -**Inherits from**: `ComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `IEnumerable?` | - | 获得/设置 可排序列的列表 | -| MinusIcon | `string?` | - | 获得/设置 减少排序条件图标 | -| PlusIcon | `string?` | - | 获得/设置 增加排序条件图标 | -| RemoveIcon | `string?` | - | 获得/设置 移除排序条件图标 | -| Value | `List?` | - | 获得/设置 排序列列表 实例值 | -| ValueChanged | `EventCallback>` | - | 获得/设置 排序列列表 回调方法 支持双向绑定 | - - - -### Event Callbacks - -| Event | Type | Description | -|-------|------|-------------| -| ValueChanged | `EventCallback>` | 获得/设置 排序列列表 回调方法 支持双向绑定 | - -### Public Methods - -- `Task OnClose(DialogResult result)` - -### Source - -- Component: [src/BootstrapBlazor/Components/Table/TableAdvancedSortDialog.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Table/TableAdvancedSortDialog.razor.cs) - -## TableColumnFilter - -TableFilter component - -**Inherits from**: `IFilter` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Column | `ITableColumn?` | - | 获得 相关联 ITableColumn 实例 | -| Icon | `string?` | - | 获得/设置 过滤图标 | -| IsActive | `bool` | - | 获得/设置 是否 active | -| IsHeaderRow | `bool` | - | 获得/设置 是否为 HeaderRow 模式 默认 false | -| NotSupportedColumnFilterMessage | `string?` | - | 获得/设置 不支持过滤类型提示信息 默认 null 读取资源文件内容 | -| Table | `ITable?` | - | 获得/设置 ITable 实例 | - - - -### Public Methods - -- `Task OnFilterAsync()` - - Filter method -- `Task Reset()` - - Reset filter method - -### Source - -- Component: [src/BootstrapBlazor/Components/Filters/TableColumnFilter.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Filters/TableColumnFilter.razor.cs) - -## TableExtensionButton - -TableExtensionButton 表格扩展按钮类 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | Specifies the content to be rendered inside this | -| OnClickButton | `Func?` | - | 获得/设置 扩展按钮点击回调方法 | - - - -### Public Methods - -- `void AddButton(ITableCellComponent button)` - - 添加按钮到工具栏方法 -- `void RemoveButton(ITableCellComponent button)` - - 从工具栏中移除按钮 - -### Source - -- Component: [src/BootstrapBlazor/Components/Table/TableExtensionButton.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Table/TableExtensionButton.razor.cs) - -## TableFooterCell - -TableFooterCell 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Aggregate | `AggregateType` | - | 获得/设置 聚合方法枚举 默认 Sum | -| Align | `Alignment` | - | 获得/设置 文字对齐方式 默认为 Alignment.None | -| ColspanCallback | `Func?` | - | 获得/设置 colspan 值 默认 null 自己手动设置值 | -| CustomerAggregateCallback | `Func?` | - | 获得/设置 自定义统计列回调方法 | -| Field | `string?` | - | 获得/设置 统计列名称 默认为 null 不参与统计仅作为显示单元格 | -| FormatString | `string?` | - | 获得/设置 格式化字符串 如时间类型设置 yyyy-MM-dd | -| Formatter | `Func>?` | - | 获得/设置 列格式化回调委托 | -| ShownWithBreakPoint | `BreakPoint` | - | 获得/设置 显示节点阈值 默认值 BreakPoint.None 未设置 | -| Text | `string?` | - | 获得/设置 单元格内容 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Table/TableFooterCell.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Table/TableFooterCell.razor.cs) - -## TableToolbar - -Table Toolbar 组件 - -### Type Parameters - -- `TItem` - Generic type parameter - -**Inherits from**: `ComponentBase` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ChildContent | `RenderFragment?` | - | Specifies the content to be rendered inside this | -| GearIcon | `string?` | - | 获得/设置 移动端按钮图标 | -| IsAutoCollapsedToolbarButton | `bool` | true | 获得/设置 是否自动收缩工具栏按钮 默认 true | -| OnGetSelectedRows | `Func>?` | - | 获得/设置 按钮点击后回调委托 | -| ShowColorWhenToolbarButtonsCollapsed | `bool` | - | 获得/设置 工具栏按钮收缩后是否继承原先按钮的颜色样式 默认 false | - - - -### Public Methods - -- `void AddButton(IToolbarComponent button)` - - 添加按钮到工具栏方法 -- `void RemoveButton(IToolbarComponent button)` - - 移除按钮到工具栏方法 - -### Source - -- Component: [src/BootstrapBlazor/Components/Table/TableToolbar.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Table/TableToolbar.razor.cs) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms-treeview.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms-treeview.txt deleted file mode 100644 index 1cd8d34976f..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms-treeview.txt +++ /dev/null @@ -1,198 +0,0 @@ -# BootstrapBlazor Tree Components - -> Auto-generated parameter reference for treeview components - -## Components - -- [SkeletonTree](#skeletontree) -- [Tree](#tree) -- [TreeView](#treeview) -- [TreeViewRow](#treeviewrow) - -## SkeletonTree - -树状组件骨架屏组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Icon | `string?` | - | 获得/设置 Loading 图标 | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/Skeleton/SkeletonTree.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Skeleton/SkeletonTree.razor.cs) - -## Tree - -Tree 组件 - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| ActiveItem | `TreeItem?` | - | 获得/设置 选中节点 默认 null | -| ClickToggleNode | `bool` | - | 获得/设置 是否点击节点时展开或者收缩子项 默认 false | -| ExpandNodeIcon | `string?` | - | 获得/设置 Tree Node 展开节点图标 | -| IsAccordion | `bool` | - | 获得/设置 是否为手风琴效果 默认为 false | -| Items | `List?` | - | 获得/设置 菜单数据集合 | -| NodeIcon | `string?` | - | 获得/设置 Tree Node 节点图标 | -| OnExpandNode | `Func?` | - | 获得/设置 节点展开前回调委托 | -| OnTreeItemChecked | `Func, Task>?` | - | 获得/设置 树形控件节点选中时回调委托 | -| OnTreeItemClick | `Func?` | - | 获得/设置 树形控件节点点击时回调委托 | -| ShowCheckbox | `bool` | - | 获得/设置 是否显示 CheckBox 默认 false 不显示 | -| ShowIcon | `bool` | - | 获得/设置 是否显示 Icon 图标 默认 false 不显示 | -| ShowRadio | `bool` | - | 获得/设置 是否显示 Radio 默认 false 不显示 | -| ShowSkeleton | `bool` | - | 获得/设置 是否显示加载骨架屏 默认 false 不显示 | - - - -### Public Methods - -- `IEnumerable GetCheckedItems()` - - 获得 所有选中节点集合 - -### Source - -- Component: [src/BootstrapBlazor/Components/Tree/Tree.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/Tree/Tree.razor.cs) - -## TreeView - -Tree component - -### Type Parameters - -- `TItem` - Generic type parameter - -**Inherits from**: `IModelEqualityComparer` - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| AllowDrag | `bool` | - | Gets or sets a value indicating whether drag-and-drop operations are allowed. Default is false | -| AutoCheckChildren | `bool` | - | Gets or sets whether to automatically update child nodes when the node state changes. Default is false. | -| AutoCheckParent | `bool` | - | Gets or sets whether to automatically update parent nodes when the node state changes. Default is false. | -| CanExpandWhenDisabled | `bool` | - | Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. | -| ClearSearchIcon | `string?` | - | Gets or sets the clear search icon. Default is not set, using the built-in theme icon. | -| ClickToggleCheck | `bool` | - | Gets or sets whether clicking a node toggles its checkbox state. Default is false. Effective when is true. | -| ClickToggleNode | `bool` | - | Gets or sets whether clicking a node expands or collapses its children. Default is false. | -| CustomKeyAttribute | `Type` | typeof(KeyAttribute) | | -| EnableKeyboard | `bool` | - | Gets or sets whether to enable keyboard navigation. Default is false. ArrowLeft collapses the node. ArrowRight expands the node. ArrowUp moves to the previous node. ArrowDown moves to the next node. Space selects the current node. | -| ExpandNodeIcon | `string?` | - | Gets or sets the icon for expanded tree nodes. | -| IsAccordion | `bool` | - | Gets or sets whether the tree view has accordion behavior. Default is false. Accordion behavior is not supported in virtual scrolling mode. | -| IsDisabled | `bool` | - | Gets or sets whether the entire component is disabled. Default is false. | -| IsVirtualize | `bool` | - | Gets or sets whether to enable virtual scrolling. Default is false. | -| Items | `List>?` | - | Gets or sets the hierarchical data collection. | -| LoadingIcon | `string?` | - | Gets or sets the loading icon for tree nodes. | -| MaxSelectedCount | `int` | - | Gets or sets the maximum number of selected items. | -| ModelEqualityComparer | `Func?` | - | | -| NodeIcon | `string?` | - | Gets or sets the icon for tree nodes. | -| OnBeforeTreeItemClick | `Func, Task>?` | - | 获得/设置 点击节点前回调方法 | -| OnDragItemEndAsync | `Func, Task>?` | - | 获得/设置 拖动标签页结束回调方法 | -| OnExpandNodeAsync | `Func, Task>>>?` | - | Gets or sets the callback method to get child data when a node is expanded. | -| OnMaxSelectedCountExceed | `Func?` | - | Gets or sets the callback method when the maximum number of selected items is exceeded. | -| OnSearchAsync | `Func>?>>?` | - | Gets or sets the search callback method. Default is null. | -| OnTreeItemChecked | `Func>, Task>?` | - | Gets or sets the callback method when a tree item is checked. | -| OnTreeItemClick | `Func, Task>?` | - | Gets or sets the callback method when a tree item is clicked. | -| OnUpdateCallbackAsync | `Func>?` | - | Gets or sets the update the tree text value callback. Default is null. If return true will update the tree text value, otherwise will not update. | -| OverscanCount | `int` | 10 | Gets or sets the overscan count for virtual scrolling. Default is 10. | -| RowHeight | `float` | 29f | Gets or sets the row height for virtual scrolling. Default is 29f. | -| ScrollIntoViewOptions | `ScrollIntoViewOptions?` | - | Gets or sets the scroll into view options for keyboard navigation. Default is null, using { behavior: "smooth", block: "nearest", inline: "start" }. | -| SearchIcon | `string?` | - | Gets or sets the search icon. Default is not set, using the built-in theme icon. | -| SearchTemplate | `RenderFragment?` | - | Gets or sets the search bar template. Default is null. | -| ShowCheckbox | `bool` | - | Gets or sets whether to show checkboxes. Default is false. | -| ShowIcon | `bool` | - | Gets or sets whether to show icons. Default is false. | -| ShowResetSearchButton | `bool` | true | Gets or sets whether to show the reset search button. Default is true. | -| ShowSearch | `bool` | - | Gets or sets whether to show the search bar. Default is false. | -| ShowSkeleton | `bool` | - | Gets or sets whether to show the loading skeleton. Default is false. | -| ShowToolbar | `bool` | - | Gets or sets whether show the toolbar of tree view item. Default is false. | -| ShowToolbarCallback | `Func, Task>?` | - | Gets or sts A callback method that determines whether to show the toolbar of the tree view item. | -| ToolbarEditLabelText | `string?` | - | Gets or sets the title of the popup-window. Default is null. | -| ToolbarEditTitle | `string?` | - | Gets or sets the title of the popup-window. Default is null. | -| ToolbarTemplate | `RenderFragment?` | - | Gets or sets the toolbar content template. Default is null. | - - - -### Public Methods - -- `void ClearCheckedItems()` - - Clear all selected nodes -- `bool Equals(TItem? x, TItem? y)` - - Check if the data is the same -- `IEnumerable> GetCheckedItems()` - - Gets all selected node collections -- `Task> GetParentsState(List items)` - - Client-side method to query the state of the specified row checkbox, called by JavaScript - - *[JSInvokable]* -- `void SetActiveItem(TreeViewItem? item)` - - Set the active node -- `void SetActiveItem(TItem item)` - - Set the active node -- `void SetItems(List> items)` - - Set the data source method for -- `ValueTask TriggerDragEnd(int originIndex, int currentIndex, bool isChildren)` - - Triggers the end of a drag-and-drop operation within the tree view. - - *[JSInvokable]* -- `ValueTask TriggerKeyDown(string key)` - - Client-side user keyboard operation handler method called by JavaScript - - *[JSInvokable]* - -### Source - -- Component: [src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs) -- Examples: [src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor) - -## TreeViewRow - -TreeViewRow component - -### Type Parameters - -- `TItem` - Generic type parameter - -### Parameters - - - -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| CanExpandWhenDisabled | `bool` | - | Gets or sets whether nodes can be expanded or collapsed when the component is disabled. Default is false. | -| ExpandNodeIcon | `string?` | - | Gets or sets the icon for expanded tree nodes. | -| Index | `int` | - | Gets or sets the node index. Default is 0. | -| IsActive | `bool` | - | Gets or sets whether the node is active. Default is false. | -| IsDisabled | `bool` | - | Gets or sets whether the entire component is disabled. Default is false. | -| Item | `TreeViewItem?` | - | Gets or sets the tree node item. Default is null. | -| LoadingIcon | `string?` | - | Gets or sets the loading icon for tree nodes. | -| MaxSelectedCount | `int` | - | Gets or sets the maximum number of selected items. | -| NodeIcon | `string?` | - | Gets or sets the icon for tree nodes. | -| OnBeforeStateChangedCallback | `Func, CheckboxState, Task>?` | - | Gets or sets the callback that is invoked before the node state changes. | -| OnCheckStateChanged | `Func, CheckboxState, Task>?` | - | Get or sets the node checkbox state change event callback. | -| OnClick | `Func, Task>?` | - | Gets or sets the click event callback. Default is null. | -| OnToggleNodeAsync | `Func, Task>?` | - | Get or sets the node click event callback. | -| OnUpdateCallbackAsync | `Func>?` | - | Gets or sets the update the tree text value callback. Default is null. If return true will update the tree text value, otherwise will not update. | -| ShowCheckbox | `bool` | - | Gets or sets whether to show checkboxes. Default is false. | -| ShowIcon | `bool` | - | Gets or sets whether to show icons. Default is false. | -| ShowToolbar | `bool` | - | Gets or sets whether show the toolbar of tree view item. Default is false. | -| ShowToolbarCallback | `Func, Task>?` | - | A callback method that determines whether to show the toolbar of the tree view item. | -| ToolbarEditLabelText | `string?` | - | Gets or sets the title of the popup-window. Default is null. | -| ToolbarEditTitle | `string?` | - | Gets or sets the title of the popup-window. Default is null. | -| ToolbarTemplate | `RenderFragment?` | - | Gets or sets the toolbar content template. Default is null. | - - - -### Source - -- Component: [src/BootstrapBlazor/Components/TreeView/TreeViewRow.razor.cs](https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/TreeView/TreeViewRow.razor.cs) - ---- - - diff --git a/src/BootstrapBlazor.Server/wwwroot/llms/llms.txt b/src/BootstrapBlazor.Server/wwwroot/llms/llms.txt deleted file mode 100644 index c088f28e3fa..00000000000 --- a/src/BootstrapBlazor.Server/wwwroot/llms/llms.txt +++ /dev/null @@ -1,145 +0,0 @@ -# BootstrapBlazor - -> Enterprise-class Blazor UI component library based on Bootstrap 5 - -## Quick Start - -```bash -dotnet add package BootstrapBlazor -``` - -### Configuration - -```csharp -// Program.cs -builder.Services.AddBootstrapBlazor(); -``` - -```razor -@* _Imports.razor *@ -@using BootstrapBlazor.Components -``` - -```html - - - -``` - -## Component Categories - -For detailed documentation, refer to the specific llms-{category}.txt files. - -### Buttons -→ See: llms-button.txt - -Button, button group, dropdown button, split button - -Components: Button, ButtonBase, ButtonUpload, DialButton, FilterButton, FullScreenButton, GoTop, NavbarToggleButton, PopConfirmButton, PopConfirmButtonBase - ... and 9 more - -### Containers -→ See: llms-card.txt - -Card, collapse, group box, split, layout - -Components: Card, CardUpload, Collapse, GroupBox - -### Dialogs & Feedback -→ See: llms-dialog.txt - -Modal, drawer, dialog service, message, toast - -Components: DialogBase, Drawer, EditDialog, IconDialog, Message, Modal, ModalDialog, ResultDialogFooter, SearchDialog, Toast - ... and 1 more - -### Form Validation -→ See: llms-form.txt - -ValidateForm, editor form, validation rules - -Components: EditorForm, ValidateForm - -### Form Inputs -→ See: llms-input.txt - -Text input, number input, textarea, date picker - -Components: BootstrapInput, BootstrapInputBase, BootstrapInputEventBase, BootstrapInputGroup, BootstrapInputGroupIcon, BootstrapInputNumber, InputUpload, OtpInput, Textarea - -### Navigation -→ See: llms-nav.txt - -Menu, tabs, breadcrumb, steps, pagination - -Components: Anchor, AnchorLink, Breadcrumb, ContextMenu, ContextMenuZone, GotoNavigator, Menu, MenuLink, Nav, Navbar - ... and 14 more - -### Other Components -→ See: llms-other.txt - -Miscellaneous components - -Components: Affix, Alert, AlertBase, AutoFill, Avatar, AvatarUpload, Badge, BoolFilter, BootstrapBlazorIcon, BootstrapBlazorRoot - ... and 107 more - -### Selection Components -→ See: llms-select.txt - -Select, multi-select, autocomplete, cascader, transfer - -Components: AutoComplete, Cascader, Dropdown, DropdownItem, DropdownWidget, MultiSelect, MultiSelectFilter, MultiSelectGeneric, NavbarDropdown, NavbarDropdownItem - ... and 11 more - -### Data Display - Table -→ See: llms-table.txt - -Complex data table with sorting, filtering, paging, editing - -Components: SelectTable, SkeletonTable, Table, TableAdvancedSortDialog, TableColumnFilter, TableExtensionButton, TableFooterCell, TableToolbar - -### Tree Components -→ See: llms-treeview.txt - -TreeView, tree select - -Components: SkeletonTree, Tree, TreeView, TreeViewRow - -## Source Code Reference - -GitHub Repository: https://github.com/dotnetcore/BootstrapBlazor - -When documentation is insufficient, consult the source code: - -### File Structure - -``` -https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor/Components/{ComponentName}/ -├── {Component}.razor # Razor template -├── {Component}.razor.cs # Component logic & parameters -├── {Component}Base.cs # Base class (if exists) -├── {Component}Option.cs # Configuration options -└── {Component}Service.cs # Service class (Dialog, Toast, etc.) -``` - -### Examples - -``` -https://github.com/dotnetcore/BootstrapBlazor/blob/main/src/BootstrapBlazor.Server/Components/Samples/{ComponentName}s.razor -``` - -### Reading Component Parameters - -Look for properties with `[Parameter]` attribute: - -```csharp -/// -/// Gets or sets whether to show the toolbar -/// -[Parameter] -public bool ShowToolbar { get; set; } -``` - ---- -Generated: 2026-01-02 -Repository: https://github.com/dotnetcore/BootstrapBlazor/blob/main/ From 2c2a21bd7c3e821876bb9b20303749e30aeea7c9 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 16:20:26 +0800 Subject: [PATCH 12/34] =?UTF-8?q?revert:=20=E6=92=A4=E9=94=80=20build=20ac?= =?UTF-8?q?tion=20=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 06b6afde537..d6060be9b53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,7 +52,3 @@ jobs: - name: Check Localizer run: | dotnet test test/UnitTest.Localization - - - name: Check LLM Documentation - run: | - dotnet run --project tools/LlmsDocsGenerator -- --check From b44f47efa5df1b42c8cfeb22a210923f35eb99b5 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 16:22:25 +0800 Subject: [PATCH 13/34] =?UTF-8?q?revert:=20=E6=92=A4=E9=94=80=20docker=20a?= =?UTF-8?q?ction=20=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 422d2fe9e0a..495bf5c33e4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,16 +13,6 @@ jobs: steps: - uses: actions/checkout@v4 - - - name: Setup .NET Core SDK - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 8.0.x - - - name: Generate LLM Documentation - run: | - dotnet run --project tools/LlmsDocsGenerator - - name: Login to Docker Hub uses: docker/login-action@v3 with: From df7707fb471b2810ec61aa8c59530be40158a437 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 16:23:49 +0800 Subject: [PATCH 14/34] =?UTF-8?q?revert:=20=E6=92=A4=E9=94=80=20dockerfile?= =?UTF-8?q?=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/Dockerfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/BootstrapBlazor.Server/Dockerfile b/src/BootstrapBlazor.Server/Dockerfile index 94484792665..881334f77dc 100644 --- a/src/BootstrapBlazor.Server/Dockerfile +++ b/src/BootstrapBlazor.Server/Dockerfile @@ -15,11 +15,7 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build WORKDIR / COPY . . -# Generate LLM documentation -WORKDIR /tools/LlmsDocsGenerator -RUN dotnet run - -WORKDIR "/src/BootstrapBlazor.Server" +WORKDIR "src/BootstrapBlazor.Server" FROM build AS publish RUN dotnet build RUN dotnet publish -c Release -o /app From 99741e8ef084125f7a3bc171c5cb481426776218 Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 16:45:05 +0800 Subject: [PATCH 15/34] =?UTF-8?q?fix(DocsGenerator):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=9C=80=E6=96=B0=E7=BB=84=E4=BB=B6=E6=BA=90?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=97=B6=E9=97=B4=E6=88=B3=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/LlmsDocsGenerator/DocsGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index bd7f7a9cbb9..b3825e59c72 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -140,7 +140,7 @@ public async Task CheckAsync() // compute the most recent component source timestamp: var newestComponentWrite = components - .SelectMany(c => c.SourceFiles) + .Select(c => c.SourcePath) .Select(File.GetLastWriteTimeUtc) .DefaultIfEmpty(indexLastWrite) .Max(); From 95586888187dbe6b726338636cab5c8d236c70bf Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 16:46:50 +0800 Subject: [PATCH 16/34] =?UTF-8?q?fix(DocsGenerator):=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=E6=9C=80=E5=90=8E=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=9B=BF=E4=BB=A3=E6=BA=90=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=88=B3=E8=AE=A1=E7=AE=97=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/LlmsDocsGenerator/DocsGenerator.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index b3825e59c72..c02f81f0d0d 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -140,8 +140,7 @@ public async Task CheckAsync() // compute the most recent component source timestamp: var newestComponentWrite = components - .Select(c => c.SourcePath) - .Select(File.GetLastWriteTimeUtc) + .Select(c => c.LastModified) .DefaultIfEmpty(indexLastWrite) .Max(); From 073d26ed53300b333d1bb12880905efc28a4dd10 Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 17:00:11 +0800 Subject: [PATCH 17/34] =?UTF-8?q?feat(DocsGenerator):=20=E7=A1=AE=E4=BF=9D?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E7=9B=AE=E5=BD=95=E5=AD=98=E5=9C=A8=E4=BB=A5?= =?UTF-8?q?=E9=81=BF=E5=85=8D=E6=96=87=E4=BB=B6=E5=86=99=E5=85=A5=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/LlmsDocsGenerator/DocsGenerator.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index c02f81f0d0d..84136e96c18 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -93,6 +93,9 @@ public async Task GenerateIndexAsync() private async Task GenerateIndexAsync(Dictionary> categorized) { + // Ensure output directory exists + Directory.CreateDirectory(_outputPath); + var indexPath = Path.Combine(_outputPath, "llms.txt"); var content = _markdownBuilder.BuildIndex(categorized); await File.WriteAllTextAsync(indexPath, content); @@ -111,6 +114,9 @@ public async Task GenerateComponentAsync(string componentName) return; } + // Ensure output directory exists + Directory.CreateDirectory(_outputPath); + var content = _markdownBuilder.BuildComponentDoc(component); var fileName = $"llms-{componentName.ToLowerInvariant()}.txt"; var filePath = Path.Combine(_outputPath, fileName); @@ -263,6 +269,9 @@ private string GetCategoryFileName(string category) private async Task GenerateCategoryDocAsync(string category, List components) { + // Ensure output directory exists + Directory.CreateDirectory(_outputPath); + var fileName = GetCategoryFileName(category); var filePath = Path.Combine(_outputPath, fileName); var content = _markdownBuilder.BuildCategoryDoc(category, components); From 6cf4a8eec4d550de3722c982801151fc59d99ff4 Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 17:00:26 +0800 Subject: [PATCH 18/34] =?UTF-8?q?feat(DocsGenerator):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20CLI=20=E5=B7=A5=E5=85=B7=E9=85=8D=E7=BD=AE=E5=92=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LlmsDocsGenerator.csproj | 14 ++++++ tools/LlmsDocsGenerator/README.md | 49 +++++++++++++++++-- tools/LlmsDocsGenerator/README.zh-CN.md | 49 +++++++++++++++++-- 3 files changed, 104 insertions(+), 8 deletions(-) diff --git a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj index 94a286763d9..7dccbb4cb4d 100644 --- a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj +++ b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj @@ -6,6 +6,20 @@ enable enable LlmsDocsGenerator + + + true + bbllmsdocs + BootstrapBlazor.LlmsDocsGenerator + 1.0.0 + BootstrapBlazor + BootstrapBlazor + A CLI tool to generate LLM-friendly documentation for BootstrapBlazor components + https://github.com/dotnetcore/BootstrapBlazor + https://github.com/dotnetcore/BootstrapBlazor + blazor;bootstrap;documentation;llm;ai + Apache-2.0 + false diff --git a/tools/LlmsDocsGenerator/README.md b/tools/LlmsDocsGenerator/README.md index 2f31a91192a..7d3c30d97c7 100644 --- a/tools/LlmsDocsGenerator/README.md +++ b/tools/LlmsDocsGenerator/README.md @@ -82,10 +82,45 @@ Components are automatically grouped into categories: | form | ValidateForm, EditorForm | | other | All other components | +## Installation + +### Install as Global Tool + +```bash +dotnet pack tools/LlmsDocsGenerator +dotnet tool install --global --add-source ./tools/LlmsDocsGenerator/bin/Release BootstrapBlazor.LlmsDocsGenerator +``` + +Or install from NuGet (once published): + +```bash +dotnet tool install --global BootstrapBlazor.LlmsDocsGenerator +``` + +### Update Tool + +```bash +dotnet tool update --global BootstrapBlazor.LlmsDocsGenerator +``` + +### Uninstall Tool + +```bash +dotnet tool uninstall --global BootstrapBlazor.LlmsDocsGenerator +``` + ## Usage +Once installed as a global tool, use the `bbllmsdocs` command: + ### Generate All Documentation +```bash +bbllmsdocs +``` + +Or when running from source: + ```bash dotnet run --project tools/LlmsDocsGenerator ``` @@ -93,19 +128,19 @@ dotnet run --project tools/LlmsDocsGenerator ### Generate Specific Component ```bash -dotnet run --project tools/LlmsDocsGenerator -- --component Table +bbllmsdocs --component Table ``` ### Generate Index Only ```bash -dotnet run --project tools/LlmsDocsGenerator -- --index-only +bbllmsdocs --index-only ``` ### Check Freshness (CI/CD) ```bash -dotnet run --project tools/LlmsDocsGenerator -- --check +bbllmsdocs --check ``` Returns exit code 1 if documentation is outdated. @@ -113,7 +148,13 @@ Returns exit code 1 if documentation is outdated. ### Custom Output Directory ```bash -dotnet run --project tools/LlmsDocsGenerator -- --output ./docs +bbllmsdocs --output ./docs +``` + +### Show Help + +```bash +bbllmsdocs --help ``` ## CI/CD Integration diff --git a/tools/LlmsDocsGenerator/README.zh-CN.md b/tools/LlmsDocsGenerator/README.zh-CN.md index dab13f66c7e..99e7018c6bb 100644 --- a/tools/LlmsDocsGenerator/README.zh-CN.md +++ b/tools/LlmsDocsGenerator/README.zh-CN.md @@ -82,10 +82,45 @@ var summary = ExtractXmlSummary(property); | form | ValidateForm, EditorForm | | other | 其他所有组件 | +## 安装dotnet tool install --global --add-source ./tools/LlmsDocsGenerator/bin/Debug BootstrapBlazor.LlmsDocsGenerator + +### 作为全局工具安装 + +```bash +dotnet pack tools/LlmsDocsGenerator +dotnet tool install --global --add-source ./tools/LlmsDocsGenerator/bin/Release BootstrapBlazor.LlmsDocsGenerator +``` + +或从 NuGet 安装(发布后): + +```bash +dotnet tool install --global BootstrapBlazor.LlmsDocsGenerator +``` + +### 更新工具 + +```bash +dotnet tool update --global BootstrapBlazor.LlmsDocsGenerator +``` + +### 卸载工具 + +```bash +dotnet tool uninstall --global BootstrapBlazor.LlmsDocsGenerator +``` + ## 使用方法 +安装为全局工具后,使用 `bbllmsdocs` 命令: + ### 生成所有文档 +```bash +bbllmsdocs +``` + +或从源代码运行: + ```bash dotnet run --project tools/LlmsDocsGenerator ``` @@ -93,19 +128,19 @@ dotnet run --project tools/LlmsDocsGenerator ### 生成特定组件 ```bash -dotnet run --project tools/LlmsDocsGenerator -- --component Table +bbllmsdocs --component Table ``` ### 仅生成索引 ```bash -dotnet run --project tools/LlmsDocsGenerator -- --index-only +bbllmsdocs --index-only ``` ### 检查文档是否过期(CI/CD) ```bash -dotnet run --project tools/LlmsDocsGenerator -- --check +bbllmsdocs --check ``` 如果文档过期,返回退出码 1。 @@ -113,7 +148,13 @@ dotnet run --project tools/LlmsDocsGenerator -- --check ### 自定义输出目录 ```bash -dotnet run --project tools/LlmsDocsGenerator -- --output ./docs +bbllmsdocs --output ./docs +``` + +### 显示帮助 + +```bash +bbllmsdocs --help ``` ## CI/CD 集成 From 2d9cf90ddebe8630d6a6f52c2d822ad447c87a33 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 16:54:30 +0800 Subject: [PATCH 19/34] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E5=A2=9E=E5=8A=A0=20llms=20=E5=8D=95=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exclusion.dic | 1 + 1 file changed, 1 insertion(+) diff --git a/exclusion.dic b/exclusion.dic index 34a15eb8ae0..72d5533ed4b 100644 --- a/exclusion.dic +++ b/exclusion.dic @@ -123,3 +123,4 @@ Protocol vditor alertdialog blazorbootstrap +llms From 5713f1c07a9647ea624c11da075494fb46c2fc72 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 16:54:48 +0800 Subject: [PATCH 20/34] =?UTF-8?q?doc:=20=E6=9B=B4=E6=96=B0=20readme=20?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/LlmsDocsGenerator/README.md | 2 +- tools/LlmsDocsGenerator/README.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/LlmsDocsGenerator/README.md b/tools/LlmsDocsGenerator/README.md index 7d3c30d97c7..dd7236301ea 100644 --- a/tools/LlmsDocsGenerator/README.md +++ b/tools/LlmsDocsGenerator/README.md @@ -23,7 +23,7 @@ AI coding assistants (Claude Code, Cursor, GitHub Copilot) often generate incorr │ ▼ ┌─────────────────────────────────────────────────────────────┐ -│ Output: wwwroot/llms/ │ +│ Output: wwwroot/llms/ │ ├─────────────────────────────────────────────────────────────┤ │ llms.txt → Index with quick start guide │ │ llms-table.txt → Table component documentation │ diff --git a/tools/LlmsDocsGenerator/README.zh-CN.md b/tools/LlmsDocsGenerator/README.zh-CN.md index 99e7018c6bb..343b8e29e7b 100644 --- a/tools/LlmsDocsGenerator/README.zh-CN.md +++ b/tools/LlmsDocsGenerator/README.zh-CN.md @@ -249,7 +249,7 @@ RUN dotnet run ``` AI 代理工作流程: 1. 读取 llms.txt (5KB) → 快速了解组件分类 -2. 按需读取 llms-{category}.txt → 获取详细参数 +2. 按需读取 llms-{component}.txt → 获取详细参数 3. 不确定时查阅 GitHub 源码 → 获取准确信息 4. 参考 Samples 目录 → 学习官方用法 ``` From 113f1e23905a5c55f8c37e7508bd5810bb94fafc Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 17:06:39 +0800 Subject: [PATCH 21/34] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0=20llms-docs?= =?UTF-8?q?=20=E8=87=AA=E5=8A=A8=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 临时使用 build 事件调试成功后使用发布事件 --- dotnet-tools.json | 7 +++++ .../Directory.Build.targets | 9 ++++++ .../LlmsDocsGenerator.csproj | 28 +++++++++---------- 3 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 src/BootstrapBlazor.Server/Directory.Build.targets diff --git a/dotnet-tools.json b/dotnet-tools.json index 8cc47019440..861a5426c2e 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -8,6 +8,13 @@ "css-bundler" ], "rollForward": false + }, + "limsdocsgenerator": { + "version": "10.0.0", + "commands": [ + "llms-docs" + ], + "rollForward": false } } } \ No newline at end of file diff --git a/src/BootstrapBlazor.Server/Directory.Build.targets b/src/BootstrapBlazor.Server/Directory.Build.targets new file mode 100644 index 00000000000..33accb5bdf8 --- /dev/null +++ b/src/BootstrapBlazor.Server/Directory.Build.targets @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj index 7dccbb4cb4d..eb92402c80f 100644 --- a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj +++ b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj @@ -1,25 +1,21 @@ - + + 10.0.0 Exe - net8.0 + net10.0 enable enable - LlmsDocsGenerator + - + + BootstrapBlazor LLMS docs Generator + LimsDocsGenerator true - bbllmsdocs - BootstrapBlazor.LlmsDocsGenerator - 1.0.0 - BootstrapBlazor + llms-docs + ice6 (ice6@live.cn) + Copyright 2026 BootstrapBlazor - A CLI tool to generate LLM-friendly documentation for BootstrapBlazor components - https://github.com/dotnetcore/BootstrapBlazor - https://github.com/dotnetcore/BootstrapBlazor - blazor;bootstrap;documentation;llm;ai - Apache-2.0 - false @@ -27,4 +23,8 @@ + + + + From 7ec4e743e40234885d0ee3b0cbbaed0311d94fc3 Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 17:08:35 +0800 Subject: [PATCH 22/34] typo --- tools/LlmsDocsGenerator/README.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/LlmsDocsGenerator/README.zh-CN.md b/tools/LlmsDocsGenerator/README.zh-CN.md index 343b8e29e7b..f35d420aa76 100644 --- a/tools/LlmsDocsGenerator/README.zh-CN.md +++ b/tools/LlmsDocsGenerator/README.zh-CN.md @@ -82,7 +82,7 @@ var summary = ExtractXmlSummary(property); | form | ValidateForm, EditorForm | | other | 其他所有组件 | -## 安装dotnet tool install --global --add-source ./tools/LlmsDocsGenerator/bin/Debug BootstrapBlazor.LlmsDocsGenerator +## 安装 ### 作为全局工具安装 From 27a106a7268a7c8e407a7d8fc18b6eb9ef240a45 Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 17:21:27 +0800 Subject: [PATCH 23/34] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20llmsdocsgener?= =?UTF-8?q?ator=20=E7=9A=84=E5=8C=85=E5=90=8D=E5=92=8C=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E8=A1=8C=E5=B7=A5=E5=85=B7=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dotnet-tools.json | 4 ++-- tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj | 2 +- tools/LlmsDocsGenerator/README.md | 14 +++++++------- tools/LlmsDocsGenerator/README.zh-CN.md | 14 +++++++------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dotnet-tools.json b/dotnet-tools.json index 861a5426c2e..60053775f76 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -9,7 +9,7 @@ ], "rollForward": false }, - "limsdocsgenerator": { + "llmsdocsgenerator": { "version": "10.0.0", "commands": [ "llms-docs" @@ -17,4 +17,4 @@ "rollForward": false } } -} \ No newline at end of file +} diff --git a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj index eb92402c80f..b53b542ceaa 100644 --- a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj +++ b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj @@ -10,7 +10,7 @@ BootstrapBlazor LLMS docs Generator - LimsDocsGenerator + BootstrapBlazor.LlmsDocsGenerator true llms-docs ice6 (ice6@live.cn) diff --git a/tools/LlmsDocsGenerator/README.md b/tools/LlmsDocsGenerator/README.md index dd7236301ea..442f5f91cff 100644 --- a/tools/LlmsDocsGenerator/README.md +++ b/tools/LlmsDocsGenerator/README.md @@ -111,12 +111,12 @@ dotnet tool uninstall --global BootstrapBlazor.LlmsDocsGenerator ## Usage -Once installed as a global tool, use the `bbllmsdocs` command: +Once installed as a global tool, use the `llms-docs` command: ### Generate All Documentation ```bash -bbllmsdocs +llms-docs ``` Or when running from source: @@ -128,19 +128,19 @@ dotnet run --project tools/LlmsDocsGenerator ### Generate Specific Component ```bash -bbllmsdocs --component Table +llms-docs --component Table ``` ### Generate Index Only ```bash -bbllmsdocs --index-only +llms-docs --index-only ``` ### Check Freshness (CI/CD) ```bash -bbllmsdocs --check +llms-docs --check ``` Returns exit code 1 if documentation is outdated. @@ -148,13 +148,13 @@ Returns exit code 1 if documentation is outdated. ### Custom Output Directory ```bash -bbllmsdocs --output ./docs +llms-docs --output ./docs ``` ### Show Help ```bash -bbllmsdocs --help +llms-docs --help ``` ## CI/CD Integration diff --git a/tools/LlmsDocsGenerator/README.zh-CN.md b/tools/LlmsDocsGenerator/README.zh-CN.md index f35d420aa76..d30dda91ca8 100644 --- a/tools/LlmsDocsGenerator/README.zh-CN.md +++ b/tools/LlmsDocsGenerator/README.zh-CN.md @@ -111,12 +111,12 @@ dotnet tool uninstall --global BootstrapBlazor.LlmsDocsGenerator ## 使用方法 -安装为全局工具后,使用 `bbllmsdocs` 命令: +安装为全局工具后,使用 `llms-docs` 命令: ### 生成所有文档 ```bash -bbllmsdocs +llms-docs ``` 或从源代码运行: @@ -128,19 +128,19 @@ dotnet run --project tools/LlmsDocsGenerator ### 生成特定组件 ```bash -bbllmsdocs --component Table +llms-docs --component Table ``` ### 仅生成索引 ```bash -bbllmsdocs --index-only +llms-docs --index-only ``` ### 检查文档是否过期(CI/CD) ```bash -bbllmsdocs --check +llms-docs --check ``` 如果文档过期,返回退出码 1。 @@ -148,13 +148,13 @@ bbllmsdocs --check ### 自定义输出目录 ```bash -bbllmsdocs --output ./docs +llms-docs --output ./docs ``` ### 显示帮助 ```bash -bbllmsdocs --help +llms-docs --help ``` ## CI/CD 集成 From 44509c5d4a350ab0637dd95e3fe63dee83ad49e8 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 19:52:08 +0800 Subject: [PATCH 24/34] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E5=88=B0=E6=9C=80=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Conflicts: # tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj --- BootstrapBlazor.slnx | 2 +- tools/LlmsDocsGenerator/DocsGenerator.cs | 4 +- .../LlmsDocsGenerator.csproj | 8 ++-- tools/LlmsDocsGenerator/Program.cs | 47 +++++++++---------- 4 files changed, 29 insertions(+), 32 deletions(-) diff --git a/BootstrapBlazor.slnx b/BootstrapBlazor.slnx index 9f5de9cdc97..18eefc963ed 100644 --- a/BootstrapBlazor.slnx +++ b/BootstrapBlazor.slnx @@ -74,6 +74,6 @@ - + diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index 84136e96c18..c1ea0f19ee8 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -29,9 +29,9 @@ public DocsGenerator(string outputPath) private string FindSourcePath() { // Try to find src/BootstrapBlazor from current directory or parent directories - var current = Directory.GetCurrentDirectory(); + var current = AppContext.BaseDirectory; - for (int i = 0; i < 5; i++) + while (!string.IsNullOrEmpty(current)) { var srcPath = Path.Combine(current, "src", "BootstrapBlazor"); if (Directory.Exists(srcPath)) diff --git a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj index b53b542ceaa..61893eceb35 100644 --- a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj +++ b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj @@ -9,8 +9,8 @@ - BootstrapBlazor LLMS docs Generator - BootstrapBlazor.LlmsDocsGenerator + BootstrapBlazor LLMs docs Generator + BootstrapBlazor.LLMsDocsGenerator true llms-docs ice6 (ice6@live.cn) @@ -19,8 +19,8 @@ - - + + diff --git a/tools/LlmsDocsGenerator/Program.cs b/tools/LlmsDocsGenerator/Program.cs index 1fc06a78c1d..fbe5153c472 100644 --- a/tools/LlmsDocsGenerator/Program.cs +++ b/tools/LlmsDocsGenerator/Program.cs @@ -6,34 +6,30 @@ using LlmsDocsGenerator; using System.CommandLine; -var rootCommand = new RootCommand("BootstrapBlazor LLMs Documentation Generator"); -var componentOption = new Option( - name: "--component", - description: "Generate documentation for a specific component only"); - -var indexOnlyOption = new Option( - name: "--index-only", - description: "Generate only the index file (llms.txt)"); - -var checkOption = new Option( - name: "--check", - description: "Check if documentation is up-to-date (for CI/CD)"); - -var outputOption = new Option( - name: "--output", - getDefaultValue: () => "src/BootstrapBlazor.Server/wwwroot/llms", - description: "Output directory for generated files (default: src/BootstrapBlazor.Server/wwwroot/llms)"); +var componentOption = new Option("--component") { Description = "Generate documentation for a specific component only" }; +var indexOnlyOption = new Option("--index-only") { Description = "Generate only the index file (llms.txt)" }; +var checkOption = new Option("--check") { Description = "Check if documentation is up-to-date (for CI/CD)" }; +var outputOption = new Option("--output") +{ + Description = "Output directory for generated files (default: src/BootstrapBlazor.Server/wwwroot/llms)", + DefaultValueFactory = result => "src/BootstrapBlazor.Server/wwwroot/llms" +}; -rootCommand.AddOption(componentOption); -rootCommand.AddOption(indexOnlyOption); -rootCommand.AddOption(checkOption); -rootCommand.AddOption(outputOption); +var rootCommand = new RootCommand("BootstrapBlazor LLMs Documentation Generator") +{ + componentOption, + indexOnlyOption, + checkOption, + outputOption +}; -rootCommand.SetHandler(async (component, indexOnly, check, output) => +rootCommand.SetAction(async result => { + var output = result.GetValue(outputOption); var generator = new DocsGenerator(output); + var check = result.GetValue(checkOption); if (check) { var isUpToDate = await generator.CheckAsync(); @@ -41,12 +37,14 @@ return; } + var indexOnly = result.GetValue(indexOnlyOption); if (indexOnly) { await generator.GenerateIndexAsync(); return; } + var component = result.GetValue(componentOption); if (!string.IsNullOrEmpty(component)) { await generator.GenerateComponentAsync(component); @@ -54,7 +52,6 @@ } await generator.GenerateAllAsync(); +}); -}, componentOption, indexOnlyOption, checkOption, outputOption); - -return await rootCommand.InvokeAsync(args); +return await rootCommand.Parse(args).InvokeAsync(); From b6c9dd325fc313115ca039f726a177ba2d33fea3 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 19:54:33 +0800 Subject: [PATCH 25/34] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=98=B2=E6=AD=A2=E5=8F=82=E6=95=B0=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/LlmsDocsGenerator/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/LlmsDocsGenerator/Program.cs b/tools/LlmsDocsGenerator/Program.cs index fbe5153c472..babf97e08e9 100644 --- a/tools/LlmsDocsGenerator/Program.cs +++ b/tools/LlmsDocsGenerator/Program.cs @@ -26,7 +26,7 @@ rootCommand.SetAction(async result => { - var output = result.GetValue(outputOption); + var output = result.GetRequiredValue(outputOption); var generator = new DocsGenerator(output); var check = result.GetValue(checkOption); From b2d0ee29eebc2ab46f11ab5eac1a2fcb3f2bffeb Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 20:08:53 +0800 Subject: [PATCH 26/34] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=AD=A3=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=96=87=E4=BB=B6=E7=9B=AE=E6=A0=87=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/LlmsDocsGenerator/DocsGenerator.cs | 21 +++++++++++---------- tools/LlmsDocsGenerator/Program.cs | 12 ++---------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index c1ea0f19ee8..de799e5fd6a 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -15,38 +15,39 @@ public class DocsGenerator private readonly ComponentAnalyzer _analyzer; private readonly MarkdownBuilder _markdownBuilder; - public DocsGenerator(string outputPath) + public DocsGenerator() { - _outputPath = Path.GetFullPath(outputPath); - // Find the source directory (relative to tool location or current directory) - _sourcePath = FindSourcePath(); + var rootFolder = FindSourcePath(); + _sourcePath = Path.Combine(rootFolder, "BootstrapBlazor"); + _outputPath = Path.Combine(rootFolder, "BootstrapBlazor.Server", "wwwroot", "llms"); _analyzer = new ComponentAnalyzer(_sourcePath); _markdownBuilder = new MarkdownBuilder(); } - private string FindSourcePath() + private static string FindSourcePath() { // Try to find src/BootstrapBlazor from current directory or parent directories var current = AppContext.BaseDirectory; while (!string.IsNullOrEmpty(current)) { - var srcPath = Path.Combine(current, "src", "BootstrapBlazor"); + var srcPath = Path.Combine(current, "src"); if (Directory.Exists(srcPath)) { return srcPath; } var parent = Directory.GetParent(current); - if (parent == null) break; + if (parent == null) + { + break; + } current = parent.FullName; } - throw new DirectoryNotFoundException( - "Could not find src/BootstrapBlazor directory. " + - "Please run this tool from the BootstrapBlazor repository root."); + throw new DirectoryNotFoundException("Could not find src/BootstrapBlazor directory. Please run this tool from the BootstrapBlazor repository root."); } /// diff --git a/tools/LlmsDocsGenerator/Program.cs b/tools/LlmsDocsGenerator/Program.cs index babf97e08e9..70617d2fd6e 100644 --- a/tools/LlmsDocsGenerator/Program.cs +++ b/tools/LlmsDocsGenerator/Program.cs @@ -6,28 +6,20 @@ using LlmsDocsGenerator; using System.CommandLine; - var componentOption = new Option("--component") { Description = "Generate documentation for a specific component only" }; var indexOnlyOption = new Option("--index-only") { Description = "Generate only the index file (llms.txt)" }; var checkOption = new Option("--check") { Description = "Check if documentation is up-to-date (for CI/CD)" }; -var outputOption = new Option("--output") -{ - Description = "Output directory for generated files (default: src/BootstrapBlazor.Server/wwwroot/llms)", - DefaultValueFactory = result => "src/BootstrapBlazor.Server/wwwroot/llms" -}; var rootCommand = new RootCommand("BootstrapBlazor LLMs Documentation Generator") { componentOption, indexOnlyOption, - checkOption, - outputOption + checkOption }; rootCommand.SetAction(async result => { - var output = result.GetRequiredValue(outputOption); - var generator = new DocsGenerator(output); + var generator = new DocsGenerator(); var check = result.GetValue(checkOption); if (check) From 4a80d40e2479ae9d8d907cab4ccce43f8c0d30be Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 20:13:18 +0800 Subject: [PATCH 27/34] =?UTF-8?q?refactor:=20=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/LlmsDocsGenerator/DocsGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index de799e5fd6a..e1dac09df2a 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -47,7 +47,7 @@ private static string FindSourcePath() current = parent.FullName; } - throw new DirectoryNotFoundException("Could not find src/BootstrapBlazor directory. Please run this tool from the BootstrapBlazor repository root."); + throw new DirectoryNotFoundException("Could not find src directory. Please run this tool from the BootstrapBlazor repository root."); } /// From 1ee4a4cf4b850714bcdda50904087a3bfd9663ae Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 20:16:36 +0800 Subject: [PATCH 28/34] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=20dotnet=20to?= =?UTF-8?q?ol=20cli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dotnet-tools.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet-tools.json b/dotnet-tools.json index 60053775f76..b6a7c20c3ff 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -9,7 +9,7 @@ ], "rollForward": false }, - "llmsdocsgenerator": { + "bootstrapblazor.llmsdocsgenerator": { "version": "10.0.0", "commands": [ "llms-docs" @@ -17,4 +17,4 @@ "rollForward": false } } -} +} \ No newline at end of file From 7d040c092120a57b654834263b72c2e702d7ce1d Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 20:48:15 +0800 Subject: [PATCH 29/34] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20--root=20?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E9=80=82=E9=85=8D=20cli?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Directory.Build.targets | 2 +- tools/LlmsDocsGenerator/DocsGenerator.cs | 23 +++++++++---------- tools/LlmsDocsGenerator/Program.cs | 7 ++++-- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/BootstrapBlazor.Server/Directory.Build.targets b/src/BootstrapBlazor.Server/Directory.Build.targets index 33accb5bdf8..41466300985 100644 --- a/src/BootstrapBlazor.Server/Directory.Build.targets +++ b/src/BootstrapBlazor.Server/Directory.Build.targets @@ -3,7 +3,7 @@ - + diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index e1dac09df2a..7646c7363bd 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -15,35 +15,34 @@ public class DocsGenerator private readonly ComponentAnalyzer _analyzer; private readonly MarkdownBuilder _markdownBuilder; - public DocsGenerator() + public DocsGenerator(string? rootFolder) { // Find the source directory (relative to tool location or current directory) - var rootFolder = FindSourcePath(); + var root = FindSourcePath(rootFolder); - _sourcePath = Path.Combine(rootFolder, "BootstrapBlazor"); - _outputPath = Path.Combine(rootFolder, "BootstrapBlazor.Server", "wwwroot", "llms"); + _sourcePath = Path.Combine(root, "src", "BootstrapBlazor"); + _outputPath = Path.Combine(root, "src", "BootstrapBlazor.Server", "wwwroot", "llms"); _analyzer = new ComponentAnalyzer(_sourcePath); _markdownBuilder = new MarkdownBuilder(); } - private static string FindSourcePath() + private static string FindSourcePath(string? rootFolder) { // Try to find src/BootstrapBlazor from current directory or parent directories - var current = AppContext.BaseDirectory; + var current = rootFolder ?? AppContext.BaseDirectory; + System.Console.WriteLine(current); while (!string.IsNullOrEmpty(current)) { - var srcPath = Path.Combine(current, "src"); - if (Directory.Exists(srcPath)) - { - return srcPath; - } - var parent = Directory.GetParent(current); if (parent == null) { break; } + if (parent.Name.Equals("BootstrapBlazor", StringComparison.OrdinalIgnoreCase)) + { + return parent.FullName; + } current = parent.FullName; } diff --git a/tools/LlmsDocsGenerator/Program.cs b/tools/LlmsDocsGenerator/Program.cs index 70617d2fd6e..fba4a55088b 100644 --- a/tools/LlmsDocsGenerator/Program.cs +++ b/tools/LlmsDocsGenerator/Program.cs @@ -9,17 +9,20 @@ var componentOption = new Option("--component") { Description = "Generate documentation for a specific component only" }; var indexOnlyOption = new Option("--index-only") { Description = "Generate only the index file (llms.txt)" }; var checkOption = new Option("--check") { Description = "Check if documentation is up-to-date (for CI/CD)" }; +var rootFolderOption = new Option("--root") { Description = "Set the root folder of project" }; var rootCommand = new RootCommand("BootstrapBlazor LLMs Documentation Generator") { componentOption, indexOnlyOption, - checkOption + checkOption, + rootFolderOption, }; rootCommand.SetAction(async result => { - var generator = new DocsGenerator(); + var rootFolder = result.GetValue(rootFolderOption); + var generator = new DocsGenerator(rootFolder); var check = result.GetValue(checkOption); if (check) From 17bc3bf5fbcea2c5d0d9f4562cb6f6f17d99520f Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 2 Jan 2026 21:00:05 +0800 Subject: [PATCH 30/34] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E4=BF=A1=E6=81=AF=E8=BE=93=E5=87=BA=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Directory.Build.targets | 2 +- tools/LlmsDocsGenerator/DocsGenerator.cs | 52 +++++++++++-------- tools/LlmsDocsGenerator/Program.cs | 5 +- 3 files changed, 35 insertions(+), 24 deletions(-) diff --git a/src/BootstrapBlazor.Server/Directory.Build.targets b/src/BootstrapBlazor.Server/Directory.Build.targets index 41466300985..ae54057e1de 100644 --- a/src/BootstrapBlazor.Server/Directory.Build.targets +++ b/src/BootstrapBlazor.Server/Directory.Build.targets @@ -3,7 +3,7 @@ - + diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index 7646c7363bd..7e89d521d67 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -14,9 +14,12 @@ public class DocsGenerator private readonly string _sourcePath; private readonly ComponentAnalyzer _analyzer; private readonly MarkdownBuilder _markdownBuilder; + private readonly bool _debug; - public DocsGenerator(string? rootFolder) + public DocsGenerator(string? rootFolder, bool debug) { + _debug = debug; + // Find the source directory (relative to tool location or current directory) var root = FindSourcePath(rootFolder); @@ -26,11 +29,11 @@ public DocsGenerator(string? rootFolder) _markdownBuilder = new MarkdownBuilder(); } - private static string FindSourcePath(string? rootFolder) + private string FindSourcePath(string? rootFolder) { // Try to find src/BootstrapBlazor from current directory or parent directories var current = rootFolder ?? AppContext.BaseDirectory; - System.Console.WriteLine(current); + Logger($"Root path: {current}"); while (!string.IsNullOrEmpty(current)) { @@ -54,15 +57,13 @@ private static string FindSourcePath(string? rootFolder) /// public async Task GenerateAllAsync() { - Console.WriteLine($"Source path: {_sourcePath}"); - Console.WriteLine($"Output path: {_outputPath}"); - Console.WriteLine(); + Logger($"Source path: {_sourcePath}"); + Logger($"Output path: {_outputPath}"); // Analyze all components - Console.WriteLine("Analyzing components..."); + Logger("Analyzing components..."); var components = await _analyzer.AnalyzeAllComponentsAsync(); - Console.WriteLine($"Found {components.Count} components"); - Console.WriteLine(); + Logger($"Found {components.Count} components"); // Group components by category var categorized = CategorizeComponents(components); @@ -73,12 +74,11 @@ public async Task GenerateAllAsync() // Generate component documentation files foreach (var category in categorized) { - Console.WriteLine($"Generating {category.Key} documentation..."); + Logger($"Generating {category.Key} documentation..."); await GenerateCategoryDocAsync(category.Key, category.Value); } - Console.WriteLine(); - Console.WriteLine("Documentation generation complete!"); + Logger("Documentation generation complete!"); } /// @@ -99,7 +99,7 @@ private async Task GenerateIndexAsync(Dictionary> ca var indexPath = Path.Combine(_outputPath, "llms.txt"); var content = _markdownBuilder.BuildIndex(categorized); await File.WriteAllTextAsync(indexPath, content); - Console.WriteLine($"Generated: {indexPath}"); + Logger($"Generated: {indexPath}"); } /// @@ -110,7 +110,7 @@ public async Task GenerateComponentAsync(string componentName) var component = await _analyzer.AnalyzeComponentAsync(componentName); if (component == null) { - Console.WriteLine($"Component not found: {componentName}"); + Logger($"Component not found: {componentName}"); return; } @@ -121,7 +121,7 @@ public async Task GenerateComponentAsync(string componentName) var fileName = $"llms-{componentName.ToLowerInvariant()}.txt"; var filePath = Path.Combine(_outputPath, fileName); await File.WriteAllTextAsync(filePath, content); - Console.WriteLine($"Generated: {filePath}"); + Logger($"Generated: {filePath}"); } /// @@ -129,7 +129,7 @@ public async Task GenerateComponentAsync(string componentName) /// public async Task CheckAsync() { - Console.WriteLine("Checking documentation freshness..."); + Logger("Checking documentation freshness..."); var components = await _analyzer.AnalyzeAllComponentsAsync(); var categorized = CategorizeComponents(components); @@ -138,7 +138,7 @@ public async Task CheckAsync() var indexPath = Path.Combine(_outputPath, "llms.txt"); if (!File.Exists(indexPath)) { - Console.WriteLine("OUTDATED: llms.txt does not exist"); + Logger("OUTDATED: llms.txt does not exist"); return false; } @@ -152,7 +152,7 @@ public async Task CheckAsync() if (indexLastWrite < newestComponentWrite) { - Console.WriteLine("Index file is stale relative to component sources. Please regenerate docs."); + Logger("Index file is stale relative to component sources. Please regenerate docs."); return false; } // Check each category file @@ -163,7 +163,7 @@ public async Task CheckAsync() if (!File.Exists(filePath)) { - Console.WriteLine($"OUTDATED: {fileName} does not exist"); + Logger($"OUTDATED: {fileName} does not exist"); return false; } @@ -173,13 +173,13 @@ public async Task CheckAsync() { if (component.LastModified > docLastWrite) { - Console.WriteLine($"OUTDATED: {component.Name} was modified after {fileName}"); + Logger($"OUTDATED: {component.Name} was modified after {fileName}"); return false; } } } - Console.WriteLine("Documentation is up-to-date"); + Logger("Documentation is up-to-date"); return true; } @@ -276,6 +276,14 @@ private async Task GenerateCategoryDocAsync(string category, List var filePath = Path.Combine(_outputPath, fileName); var content = _markdownBuilder.BuildCategoryDoc(category, components); await File.WriteAllTextAsync(filePath, content); - Console.WriteLine($"Generated: {filePath}"); + Logger($"Generated: {filePath}"); + } + + private void Logger(string message) + { + if (_debug) + { + Console.WriteLine(message); + } } } diff --git a/tools/LlmsDocsGenerator/Program.cs b/tools/LlmsDocsGenerator/Program.cs index fba4a55088b..88eec57f4ab 100644 --- a/tools/LlmsDocsGenerator/Program.cs +++ b/tools/LlmsDocsGenerator/Program.cs @@ -10,6 +10,7 @@ var indexOnlyOption = new Option("--index-only") { Description = "Generate only the index file (llms.txt)" }; var checkOption = new Option("--check") { Description = "Check if documentation is up-to-date (for CI/CD)" }; var rootFolderOption = new Option("--root") { Description = "Set the root folder of project" }; +var debugOption = new Option("--debug") { Description = "Set the environment to development and display debugging information." }; var rootCommand = new RootCommand("BootstrapBlazor LLMs Documentation Generator") { @@ -17,12 +18,14 @@ indexOnlyOption, checkOption, rootFolderOption, + debugOption }; rootCommand.SetAction(async result => { + var debug = result.GetValue(debugOption); var rootFolder = result.GetValue(rootFolderOption); - var generator = new DocsGenerator(rootFolder); + var generator = new DocsGenerator(rootFolder, debug); var check = result.GetValue(checkOption); if (check) From d2da910e542da2841f34ae0113ab5f3c15457740 Mon Sep 17 00:00:00 2001 From: ice6 Date: Fri, 2 Jan 2026 22:04:23 +0800 Subject: [PATCH 31/34] =?UTF-8?q?feat:=20=E9=87=8D=E6=9E=84=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E6=AF=8F=E4=B8=AA=E7=BB=84=E4=BB=B6=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=96=87=E6=A1=A3=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/LlmsDocsGenerator/DocsGenerator.cs | 112 ++++++------------ tools/LlmsDocsGenerator/MarkdownBuilder.cs | 125 ++++++++++++--------- tools/LlmsDocsGenerator/README.md | 47 +++++--- tools/LlmsDocsGenerator/README.zh-CN.md | 49 ++++---- 4 files changed, 167 insertions(+), 166 deletions(-) diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs index 7e89d521d67..f5141654596 100644 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ b/tools/LlmsDocsGenerator/DocsGenerator.cs @@ -11,6 +11,7 @@ namespace LlmsDocsGenerator; public class DocsGenerator { private readonly string _outputPath; + private readonly string _componentsOutputPath; private readonly string _sourcePath; private readonly ComponentAnalyzer _analyzer; private readonly MarkdownBuilder _markdownBuilder; @@ -25,6 +26,7 @@ public DocsGenerator(string? rootFolder, bool debug) _sourcePath = Path.Combine(root, "src", "BootstrapBlazor"); _outputPath = Path.Combine(root, "src", "BootstrapBlazor.Server", "wwwroot", "llms"); + _componentsOutputPath = Path.Combine(_outputPath, "components"); _analyzer = new ComponentAnalyzer(_sourcePath); _markdownBuilder = new MarkdownBuilder(); } @@ -59,23 +61,25 @@ public async Task GenerateAllAsync() { Logger($"Source path: {_sourcePath}"); Logger($"Output path: {_outputPath}"); + Logger($"Components path: {_componentsOutputPath}"); + + // Ensure output directories exist + Directory.CreateDirectory(_outputPath); + Directory.CreateDirectory(_componentsOutputPath); // Analyze all components Logger("Analyzing components..."); var components = await _analyzer.AnalyzeAllComponentsAsync(); Logger($"Found {components.Count} components"); - // Group components by category - var categorized = CategorizeComponents(components); - // Generate index file - await GenerateIndexAsync(categorized); + await GenerateIndexAsync(components); - // Generate component documentation files - foreach (var category in categorized) + // Generate individual component documentation files + Logger("Generating individual component documentation..."); + foreach (var component in components) { - Logger($"Generating {category.Key} documentation..."); - await GenerateCategoryDocAsync(category.Key, category.Value); + await GenerateComponentDocAsync(component); } Logger("Documentation generation complete!"); @@ -87,17 +91,16 @@ public async Task GenerateAllAsync() public async Task GenerateIndexAsync() { var components = await _analyzer.AnalyzeAllComponentsAsync(); - var categorized = CategorizeComponents(components); - await GenerateIndexAsync(categorized); + await GenerateIndexAsync(components); } - private async Task GenerateIndexAsync(Dictionary> categorized) + private async Task GenerateIndexAsync(List components) { // Ensure output directory exists Directory.CreateDirectory(_outputPath); var indexPath = Path.Combine(_outputPath, "llms.txt"); - var content = _markdownBuilder.BuildIndex(categorized); + var content = _markdownBuilder.BuildIndex(components); await File.WriteAllTextAsync(indexPath, content); Logger($"Generated: {indexPath}"); } @@ -115,11 +118,16 @@ public async Task GenerateComponentAsync(string componentName) } // Ensure output directory exists - Directory.CreateDirectory(_outputPath); + Directory.CreateDirectory(_componentsOutputPath); + await GenerateComponentDocAsync(component); + } + + private async Task GenerateComponentDocAsync(ComponentInfo component) + { var content = _markdownBuilder.BuildComponentDoc(component); - var fileName = $"llms-{componentName.ToLowerInvariant()}.txt"; - var filePath = Path.Combine(_outputPath, fileName); + var fileName = $"{component.Name}.txt"; + var filePath = Path.Combine(_componentsOutputPath, fileName); await File.WriteAllTextAsync(filePath, content); Logger($"Generated: {filePath}"); } @@ -132,7 +140,6 @@ public async Task CheckAsync() Logger("Checking documentation freshness..."); var components = await _analyzer.AnalyzeAllComponentsAsync(); - var categorized = CategorizeComponents(components); // Check index file var indexPath = Path.Combine(_outputPath, "llms.txt"); @@ -155,11 +162,12 @@ public async Task CheckAsync() Logger("Index file is stale relative to component sources. Please regenerate docs."); return false; } - // Check each category file - foreach (var category in categorized) + + // Check each component file + foreach (var component in components) { - var fileName = GetCategoryFileName(category.Key); - var filePath = Path.Combine(_outputPath, fileName); + var fileName = $"{component.Name}.txt"; + var filePath = Path.Combine(_componentsOutputPath, fileName); if (!File.Exists(filePath)) { @@ -167,15 +175,12 @@ public async Task CheckAsync() return false; } - // Check if any source file is newer than the doc file + // Check if source file is newer than the doc file var docLastWrite = File.GetLastWriteTimeUtc(filePath); - foreach (var component in category.Value) + if (component.LastModified > docLastWrite) { - if (component.LastModified > docLastWrite) - { - Logger($"OUTDATED: {component.Name} was modified after {fileName}"); - return false; - } + Logger($"OUTDATED: {component.Name} was modified after {fileName}"); + return false; } } @@ -183,41 +188,7 @@ public async Task CheckAsync() return true; } - private Dictionary> CategorizeComponents(List components) - { - var categories = new Dictionary> - { - ["table"] = new(), - ["input"] = new(), - ["select"] = new(), - ["button"] = new(), - ["dialog"] = new(), - ["nav"] = new(), - ["card"] = new(), - ["treeview"] = new(), - ["form"] = new(), - ["other"] = new() - }; - - foreach (var component in components) - { - var category = GetComponentCategory(component.Name); - if (categories.ContainsKey(category)) - { - categories[category].Add(component); - } - else - { - categories["other"].Add(component); - } - } - - // Remove empty categories - return categories.Where(c => c.Value.Count > 0) - .ToDictionary(c => c.Key, c => c.Value); - } - - private string GetComponentCategory(string componentName) + private static string GetComponentCategory(string componentName) { return componentName.ToLowerInvariant() switch { @@ -262,23 +233,6 @@ var n when n.Contains("validateform") || n.Contains("editorform") || }; } - private string GetCategoryFileName(string category) - { - return $"llms-{category}.txt"; - } - - private async Task GenerateCategoryDocAsync(string category, List components) - { - // Ensure output directory exists - Directory.CreateDirectory(_outputPath); - - var fileName = GetCategoryFileName(category); - var filePath = Path.Combine(_outputPath, fileName); - var content = _markdownBuilder.BuildCategoryDoc(category, components); - await File.WriteAllTextAsync(filePath, content); - Logger($"Generated: {filePath}"); - } - private void Logger(string message) { if (_debug) diff --git a/tools/LlmsDocsGenerator/MarkdownBuilder.cs b/tools/LlmsDocsGenerator/MarkdownBuilder.cs index 1d7f0a4b59d..97c8271f45e 100644 --- a/tools/LlmsDocsGenerator/MarkdownBuilder.cs +++ b/tools/LlmsDocsGenerator/MarkdownBuilder.cs @@ -18,7 +18,7 @@ public class MarkdownBuilder /// /// Build the main llms.txt index file /// - public string BuildIndex(Dictionary> categorizedComponents) + public string BuildIndex(List components) { _sb.Clear(); @@ -53,12 +53,16 @@ public string BuildIndex(Dictionary> categorizedComp _sb.AppendLine("```"); _sb.AppendLine(); - // Component Categories - _sb.AppendLine("## Component Categories"); + // Component List - grouped by category for easy navigation + _sb.AppendLine("## Components"); _sb.AppendLine(); - _sb.AppendLine("For detailed documentation, refer to the specific llms-{category}.txt files."); + _sb.AppendLine("Each component has its own documentation file in the `components/` directory."); + _sb.AppendLine("Use `components/{ComponentName}.txt` to get detailed API information."); _sb.AppendLine(); + // Group components by category for the index + var categorized = CategorizeComponents(components); + var categoryDescriptions = new Dictionary { ["table"] = ("Data Display - Table", "Complex data table with sorting, filtering, paging, editing"), @@ -73,20 +77,23 @@ public string BuildIndex(Dictionary> categorizedComp ["other"] = ("Other Components", "Miscellaneous components") }; - foreach (var (category, components) in categorizedComponents.OrderBy(c => c.Key)) + foreach (var (category, categoryComponents) in categorized.OrderBy(c => c.Key)) { - if (components.Count == 0) continue; + if (categoryComponents.Count == 0) continue; var (title, description) = categoryDescriptions.GetValueOrDefault(category, (category, "")); _sb.AppendLine($"### {title}"); - _sb.AppendLine($"→ See: llms-{category}.txt"); _sb.AppendLine(); _sb.AppendLine($"{description}"); _sb.AppendLine(); - _sb.AppendLine("Components: " + string.Join(", ", components.Take(10).Select(c => c.Name))); - if (components.Count > 10) + + // List components with links to their individual docs + foreach (var component in categoryComponents.OrderBy(c => c.Name)) { - _sb.AppendLine($" ... and {components.Count - 10} more"); + var summary = !string.IsNullOrEmpty(component.Summary) + ? $" - {TruncateSummary(component.Summary, 60)}" + : ""; + _sb.AppendLine($"- [{component.Name}](components/{component.Name}.txt){summary}"); } _sb.AppendLine(); } @@ -131,60 +138,78 @@ public string BuildIndex(Dictionary> categorizedComp // Footer _sb.AppendLine("---"); _sb.AppendLine($"Generated: {DateTime.UtcNow:yyyy-MM-dd}"); + _sb.AppendLine($"Total Components: {components.Count}"); _sb.AppendLine($"Repository: {GitHubBaseUrl}"); return _sb.ToString(); } - /// - /// Build documentation for a category of components - /// - public string BuildCategoryDoc(string category, List components) + private static Dictionary> CategorizeComponents(List components) { - _sb.Clear(); - - var categoryTitles = new Dictionary + var categories = new Dictionary> { - ["table"] = "Table Components", - ["input"] = "Input Components", - ["select"] = "Selection Components", - ["button"] = "Button Components", - ["dialog"] = "Dialog & Feedback Components", - ["nav"] = "Navigation Components", - ["card"] = "Container Components", - ["treeview"] = "Tree Components", - ["form"] = "Form Components", - ["other"] = "Other Components" + ["table"] = [], + ["input"] = [], + ["select"] = [], + ["button"] = [], + ["dialog"] = [], + ["nav"] = [], + ["card"] = [], + ["treeview"] = [], + ["form"] = [], + ["other"] = [] }; - var title = categoryTitles.GetValueOrDefault(category, $"{category} Components"); - - _sb.AppendLine($"# BootstrapBlazor {title}"); - _sb.AppendLine(); - _sb.AppendLine($"> Auto-generated parameter reference for {category} components"); - _sb.AppendLine(); - - // Table of contents - _sb.AppendLine("## Components"); - _sb.AppendLine(); - foreach (var component in components.OrderBy(c => c.Name)) + foreach (var component in components) { - _sb.AppendLine($"- [{component.Name}](#{component.Name.ToLowerInvariant()})"); + var category = GetComponentCategory(component.Name); + if (categories.TryGetValue(category, out var list)) + { + list.Add(component); + } + else + { + categories["other"].Add(component); + } } - _sb.AppendLine(); - // Each component - foreach (var component in components.OrderBy(c => c.Name)) - { - BuildComponentSection(component); - } + // Remove empty categories + return categories.Where(c => c.Value.Count > 0) + .ToDictionary(c => c.Key, c => c.Value); + } - // Footer - _sb.AppendLine("---"); - _sb.AppendLine(""); - _sb.AppendLine($""); + private static string GetComponentCategory(string componentName) + { + return componentName.ToLowerInvariant() switch + { + var n when n.Contains("table") => "table", + var n when n.Contains("input") || n.Contains("textarea") || + n.Contains("password") || n == "otpinput" => "input", + var n when n.Contains("select") || n.Contains("dropdown") || + n.Contains("autocomplete") || n.Contains("cascader") || + n.Contains("transfer") || n.Contains("multiselect") => "select", + var n when n.Contains("button") || n == "gotop" || + n.Contains("popconfirm") => "button", + var n when n.Contains("dialog") || n.Contains("modal") || + n.Contains("drawer") || n.Contains("swal") || + n.Contains("toast") || n.Contains("message") => "dialog", + var n when n.Contains("menu") || n.Contains("tab") || + n.Contains("breadcrumb") || n.Contains("step") || + n.Contains("anchor") || n.Contains("nav") => "nav", + var n when n.Contains("card") || n.Contains("collapse") || + n.Contains("groupbox") || n.Contains("panel") => "card", + var n when n.Contains("tree") => "treeview", + var n when n.Contains("validateform") || n.Contains("editorform") || + n.Contains("validator") => "form", + _ => "other" + }; + } - return _sb.ToString(); + private static string TruncateSummary(string summary, int maxLength) + { + if (string.IsNullOrEmpty(summary)) return ""; + summary = summary.Replace("\n", " ").Replace("\r", "").Trim(); + return summary.Length <= maxLength ? summary : summary[..(maxLength - 3)] + "..."; } /// diff --git a/tools/LlmsDocsGenerator/README.md b/tools/LlmsDocsGenerator/README.md index 442f5f91cff..246c5d66bdb 100644 --- a/tools/LlmsDocsGenerator/README.md +++ b/tools/LlmsDocsGenerator/README.md @@ -26,20 +26,27 @@ AI coding assistants (Claude Code, Cursor, GitHub Copilot) often generate incorr │ Output: wwwroot/llms/ │ ├─────────────────────────────────────────────────────────────┤ │ llms.txt → Index with quick start guide │ -│ llms-table.txt → Table component documentation │ -│ llms-input.txt → Input component documentation │ -│ llms-select.txt → Selection component documentation │ -│ llms-button.txt → Button component documentation │ -│ llms-dialog.txt → Dialog component documentation │ -│ llms-nav.txt → Navigation component documentation │ -│ llms-card.txt → Container component documentation │ -│ llms-treeview.txt → Tree component documentation │ -│ llms-form.txt → Form component documentation │ -│ llms-other.txt → Other component documentation │ -│ llms-example-project.txt → Template for user projects │ +│ components/ → Individual component documentation │ +│ ├── Button.txt → Button component API reference │ +│ ├── Table.txt → Table component API reference │ +│ ├── Select.txt → Select component API reference │ +│ ├── Modal.txt → Modal component API reference │ +│ └── ... → One file per component │ └─────────────────────────────────────────────────────────────┘ ``` +### Why One File Per Component? + +This design optimizes for LLM and Code Agent consumption: + +| Aspect | Per-Category (Old) | Per-Component (New) | +|--------|-------------------|---------------------| +| **Precision** | ❌ Loads unrelated components | ✅ Only needed API info | +| **Token Efficiency** | ❌ Wastes tokens on irrelevant data | ✅ Minimal context loading | +| **Cache Friendly** | ❌ Regenerates entire category | ✅ Updates single file | +| **RAG Retrieval** | ❌ Coarse-grained matches | ✅ Fine-grained matches | +| **Incremental Updates** | ❌ Complex CI/CD checks | ✅ Simple file mapping | + ## How It Works ### 1. Source Code Analysis @@ -65,12 +72,12 @@ The `MarkdownBuilder` creates structured markdown with: - Public methods - GitHub source links -### 3. Component Categorization +### 3. Component Organization -Components are automatically grouped into categories: +Components are organized in the index by category for easy navigation, but each component has its own dedicated documentation file: -| Category | Components | -|----------|------------| +| Category | Example Components | +|----------|-------------------| | table | Table, SelectTable, TableToolbar | | input | BootstrapInput, Textarea, OtpInput | | select | Select, AutoComplete, Cascader | @@ -227,8 +234,12 @@ Users can reference this documentation in their own projects by creating a `llms ## Dependencies ### BootstrapBlazor -- Documentation: https://www.blazor.zone/llms/llms.txt -- Table: https://www.blazor.zone/llms/llms-table.txt +- Documentation Index: https://www.blazor.zone/llms/llms.txt +- Button: https://www.blazor.zone/llms/components/Button.txt +- Table: https://www.blazor.zone/llms/components/Table.txt +- Modal: https://www.blazor.zone/llms/components/Modal.txt ``` -See `llms-example-project.txt` for a complete template. +LLM agents can: +1. First read `llms.txt` to discover available components +2. Then fetch specific `components/{ComponentName}.txt` for detailed API info diff --git a/tools/LlmsDocsGenerator/README.zh-CN.md b/tools/LlmsDocsGenerator/README.zh-CN.md index d30dda91ca8..e3163ed3e59 100644 --- a/tools/LlmsDocsGenerator/README.zh-CN.md +++ b/tools/LlmsDocsGenerator/README.zh-CN.md @@ -26,20 +26,27 @@ AI 编程助手(Claude Code、Cursor、GitHub Copilot)经常因为缺乏准 │ 输出目录: wwwroot/llms/ │ ├─────────────────────────────────────────────────────────────┤ │ llms.txt → 索引文件,包含快速入门指南 │ -│ llms-table.txt → 表格组件文档 │ -│ llms-input.txt → 输入组件文档 │ -│ llms-select.txt → 选择组件文档 │ -│ llms-button.txt → 按钮组件文档 │ -│ llms-dialog.txt → 对话框组件文档 │ -│ llms-nav.txt → 导航组件文档 │ -│ llms-card.txt → 容器组件文档 │ -│ llms-treeview.txt → 树形组件文档 │ -│ llms-form.txt → 表单组件文档 │ -│ llms-other.txt → 其他组件文档 │ -│ llms-example-project.txt → 用户项目模板 │ +│ components/ → 单独的组件文档目录 │ +│ ├── Button.txt → Button 组件 API 参考 │ +│ ├── Table.txt → Table 组件 API 参考 │ +│ ├── Select.txt → Select 组件 API 参考 │ +│ ├── Modal.txt → Modal 组件 API 参考 │ +│ └── ... → 每个组件一个文件 │ └─────────────────────────────────────────────────────────────┘ ``` +### 为什么每个组件单独一个文件? + +这种设计针对 LLM 和 Code Agent 进行了优化: + +| 方面 | 按分类(旧方案) | 按组件(新方案) | +|------|-----------------|-----------------| +| **精确性** | ❌ 加载无关组件 | ✅ 只加载需要的 API | +| **Token 效率** | ❌ 浪费 token 在无关数据上 | ✅ 最小化上下文加载 | +| **缓存友好** | ❌ 需重新生成整个分类 | ✅ 只更新单个文件 | +| **RAG 检索** | ❌ 粗粒度匹配 | ✅ 细粒度匹配 | +| **增量更新** | ❌ CI/CD 检查复杂 | ✅ 简单的文件映射 | + ## 工作原理 ### 1. 源码分析 @@ -65,9 +72,9 @@ var summary = ExtractXmlSummary(property); - 公共方法 - GitHub 源码链接 -### 3. 组件分类 +### 3. 组件组织 -组件自动分组到以下类别: +组件在索引中按类别组织便于导航,但每个组件有独立的文档文件: | 类别 | 组件示例 | |------|----------| @@ -227,11 +234,15 @@ RUN dotnet run ## 依赖 ### BootstrapBlazor -- 文档: https://www.blazor.zone/llms/llms.txt -- 表格: https://www.blazor.zone/llms/llms-table.txt +- 文档索引: https://www.blazor.zone/llms/llms.txt +- Button: https://www.blazor.zone/llms/components/Button.txt +- Table: https://www.blazor.zone/llms/components/Table.txt +- Modal: https://www.blazor.zone/llms/components/Modal.txt ``` -完整模板请参考 `llms-example-project.txt`。 +LLM 代理可以: +1. 先读取 `llms.txt` 了解有哪些组件 +2. 然后获取 `components/{ComponentName}.txt` 获取详细 API 信息 ## 设计理念 @@ -241,15 +252,15 @@ RUN dotnet run |------|----------| | AI 生成错误的组件代码 | 提供准确的参数文档 | | 手动维护文档容易过期 | 自动从源码生成 | -| 文档太大占用上下文 | 按类别分割,按需加载 | +| 文档太大占用上下文 | 每组件单独文件,按需加载 | | 用户不知道如何引用 | 提供项目模板 | ### 混合文档策略 ``` AI 代理工作流程: -1. 读取 llms.txt (5KB) → 快速了解组件分类 -2. 按需读取 llms-{component}.txt → 获取详细参数 +1. 读取 llms.txt (轻量索引) → 快速了解组件列表 +2. 按需读取 components/{Component}.txt → 获取精确的 API 参考 3. 不确定时查阅 GitHub 源码 → 获取准确信息 4. 参考 Samples 目录 → 学习官方用法 ``` From ee0c2169abb754bcaf711bd795adf028bf3c1ab3 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 3 Jan 2026 18:26:55 +0800 Subject: [PATCH 32/34] chore: remove project into extensions lib --- BootstrapBlazor.slnx | 1 - tools/LlmsDocsGenerator/ComponentAnalyzer.cs | 388 ----------------- tools/LlmsDocsGenerator/ComponentInfo.cs | 139 ------ tools/LlmsDocsGenerator/DocsGenerator.cs | 243 ----------- .../LlmsDocsGenerator.csproj | 30 -- tools/LlmsDocsGenerator/MarkdownBuilder.cs | 399 ------------------ tools/LlmsDocsGenerator/Program.cs | 55 --- tools/LlmsDocsGenerator/README.md | 245 ----------- tools/LlmsDocsGenerator/README.zh-CN.md | 266 ------------ 9 files changed, 1766 deletions(-) delete mode 100644 tools/LlmsDocsGenerator/ComponentAnalyzer.cs delete mode 100644 tools/LlmsDocsGenerator/ComponentInfo.cs delete mode 100644 tools/LlmsDocsGenerator/DocsGenerator.cs delete mode 100644 tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj delete mode 100644 tools/LlmsDocsGenerator/MarkdownBuilder.cs delete mode 100644 tools/LlmsDocsGenerator/Program.cs delete mode 100644 tools/LlmsDocsGenerator/README.md delete mode 100644 tools/LlmsDocsGenerator/README.zh-CN.md diff --git a/BootstrapBlazor.slnx b/BootstrapBlazor.slnx index 18eefc963ed..0e3cf95b26d 100644 --- a/BootstrapBlazor.slnx +++ b/BootstrapBlazor.slnx @@ -74,6 +74,5 @@ - diff --git a/tools/LlmsDocsGenerator/ComponentAnalyzer.cs b/tools/LlmsDocsGenerator/ComponentAnalyzer.cs deleted file mode 100644 index a157d6a1f95..00000000000 --- a/tools/LlmsDocsGenerator/ComponentAnalyzer.cs +++ /dev/null @@ -1,388 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the Apache 2.0 License -// See the LICENSE file in the project root for more information. -// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone - -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; -using System.Text.RegularExpressions; - -namespace LlmsDocsGenerator; - -/// -/// Analyzes Blazor component source files using Roslyn -/// -public partial class ComponentAnalyzer -{ - private readonly string _sourcePath; - private readonly string _componentsPath; - private readonly string _samplesPath; - - public ComponentAnalyzer(string sourcePath) - { - _sourcePath = sourcePath; - _componentsPath = Path.Combine(sourcePath, "Components"); - _samplesPath = Path.Combine(Path.GetDirectoryName(sourcePath)!, "BootstrapBlazor.Server", "Components", "Samples"); - } - - /// - /// Analyze all components in the source directory - /// - public async Task> AnalyzeAllComponentsAsync() - { - var components = new List(); - - if (!Directory.Exists(_componentsPath)) - { - Console.WriteLine($"Components directory not found: {_componentsPath}"); - return components; - } - - // Find all .razor.cs files - var files = Directory.GetFiles(_componentsPath, "*.razor.cs", SearchOption.AllDirectories); - - foreach (var file in files) - { - var component = await AnalyzeFileAsync(file); - if (component != null && component.Parameters.Count > 0) - { - components.Add(component); - } - } - - // Also analyze .cs files that might be component base classes - var csFiles = Directory.GetFiles(_componentsPath, "*Base.cs", SearchOption.AllDirectories); - foreach (var file in csFiles) - { - var component = await AnalyzeFileAsync(file); - if (component != null && component.Parameters.Count > 0) - { - components.Add(component); - } - } - - return components.OrderBy(c => c.Name).ToList(); - } - - /// - /// Analyze a specific component by name - /// - public async Task AnalyzeComponentAsync(string componentName) - { - var pattern = $"{componentName}.razor.cs"; - var files = Directory.GetFiles(_componentsPath, pattern, SearchOption.AllDirectories); - - if (files.Length == 0) - { - // Try without .razor extension - pattern = $"{componentName}.cs"; - files = Directory.GetFiles(_componentsPath, pattern, SearchOption.AllDirectories); - } - - if (files.Length == 0) - { - return null; - } - - return await AnalyzeFileAsync(files[0]); - } - - private async Task AnalyzeFileAsync(string filePath) - { - try - { - var code = await File.ReadAllTextAsync(filePath); - var tree = CSharpSyntaxTree.ParseText(code); - var root = await tree.GetRootAsync(); - - // Find the class declaration - var classDeclaration = root.DescendantNodes() - .OfType() - .FirstOrDefault(); - - if (classDeclaration == null) - { - return null; - } - - var component = new ComponentInfo - { - Name = GetClassName(classDeclaration), - FullName = GetFullClassName(classDeclaration, root), - Summary = ExtractXmlSummary(classDeclaration), - TypeParameters = GetTypeParameters(classDeclaration), - BaseClass = GetBaseClass(classDeclaration), - SourcePath = GetRelativePath(filePath), - LastModified = File.GetLastWriteTimeUtc(filePath), - SamplePath = FindSamplePath(GetClassName(classDeclaration)) - }; - - // Extract parameters - component.Parameters = ExtractParameters(classDeclaration); - - // Extract public methods - component.PublicMethods = ExtractPublicMethods(classDeclaration); - - return component; - } - catch (Exception ex) - { - Console.WriteLine($"Error analyzing {filePath}: {ex.Message}"); - return null; - } - } - - private string GetClassName(ClassDeclarationSyntax classDeclaration) - { - return classDeclaration.Identifier.Text; - } - - private string GetFullClassName(ClassDeclarationSyntax classDeclaration, SyntaxNode root) - { - var namespaceName = root.DescendantNodes() - .OfType() - .FirstOrDefault()?.Name.ToString() ?? ""; - - var className = classDeclaration.Identifier.Text; - - if (classDeclaration.TypeParameterList != null) - { - className += classDeclaration.TypeParameterList.ToString(); - } - - return string.IsNullOrEmpty(namespaceName) ? className : $"{namespaceName}.{className}"; - } - - private List GetTypeParameters(ClassDeclarationSyntax classDeclaration) - { - if (classDeclaration.TypeParameterList == null) - { - return new List(); - } - - return classDeclaration.TypeParameterList.Parameters - .Select(p => p.Identifier.Text) - .ToList(); - } - - private string? GetBaseClass(ClassDeclarationSyntax classDeclaration) - { - var baseList = classDeclaration.BaseList; - if (baseList == null) return null; - - var baseType = baseList.Types.FirstOrDefault(); - return baseType?.Type.ToString(); - } - - private List ExtractParameters(ClassDeclarationSyntax classDeclaration) - { - var parameters = new List(); - - var properties = classDeclaration.DescendantNodes() - .OfType(); - - foreach (var property in properties) - { - // Check if property has [Parameter] attribute - var hasParameterAttr = property.AttributeLists - .SelectMany(a => a.Attributes) - .Any(a => a.Name.ToString() is "Parameter" or "ParameterAttribute"); - - if (!hasParameterAttr) continue; - - var paramInfo = new ParameterInfo - { - Name = property.Identifier.Text, - Type = SimplifyTypeName(property.Type?.ToString() ?? "unknown"), - DefaultValue = GetDefaultValue(property), - Description = ExtractXmlSummary(property), - IsRequired = HasAttribute(property, "EditorRequired"), - IsObsolete = HasAttribute(property, "Obsolete"), - ObsoleteMessage = GetObsoleteMessage(property), - IsEventCallback = property.Type?.ToString().Contains("EventCallback") ?? false - }; - - // Skip obsolete parameters - if (!paramInfo.IsObsolete) - { - parameters.Add(paramInfo); - } - } - - return parameters.OrderBy(p => p.Name).ToList(); - } - - private List ExtractPublicMethods(ClassDeclarationSyntax classDeclaration) - { - var methods = new List(); - - var methodDeclarations = classDeclaration.DescendantNodes() - .OfType() - .Where(m => m.Modifiers.Any(mod => mod.IsKind(SyntaxKind.PublicKeyword))); - - foreach (var method in methodDeclarations) - { - // Skip property accessors, overrides of base class methods - if (method.Modifiers.Any(m => m.IsKind(SyntaxKind.OverrideKeyword))) - continue; - - var methodInfo = new MethodInfo - { - Name = method.Identifier.Text, - ReturnType = SimplifyTypeName(method.ReturnType.ToString()), - Description = ExtractXmlSummary(method), - IsJSInvokable = HasAttribute(method, "JSInvokable"), - Parameters = method.ParameterList.Parameters - .Select(p => (SimplifyTypeName(p.Type?.ToString() ?? ""), p.Identifier.Text)) - .ToList() - }; - - methods.Add(methodInfo); - } - - return methods; - } - - private string? ExtractXmlSummary(SyntaxNode node) - { - var trivia = node.GetLeadingTrivia(); - var xmlTrivia = trivia.FirstOrDefault(t => - t.IsKind(SyntaxKind.SingleLineDocumentationCommentTrivia) || - t.IsKind(SyntaxKind.MultiLineDocumentationCommentTrivia)); - - if (xmlTrivia == default) - return null; - - var xmlText = xmlTrivia.ToString(); - - // Extract content from tags - var match = SummaryRegex().Match(xmlText); - if (match.Success) - { - var summary = match.Groups[1].Value; - // Clean up the summary - summary = CleanXmlComment(summary); - return string.IsNullOrWhiteSpace(summary) ? null : summary; - } - - return null; - } - - private string CleanXmlComment(string comment) - { - // Remove /// prefixes and extra whitespace - var lines = comment.Split('\n') - .Select(l => l.Trim().TrimStart('/').Trim()) - .Where(l => !string.IsNullOrWhiteSpace(l)); - - return string.Join(" ", lines); - } - - private string? GetDefaultValue(PropertyDeclarationSyntax property) - { - var initializer = property.Initializer; - if (initializer != null) - { - return SimplifyDefaultValue(initializer.Value.ToString()); - } - - // Check for default in constructor or OnParametersSet - return null; - } - - private string SimplifyDefaultValue(string value) - { - // Simplify common patterns - if (value == "false") return "false"; - if (value == "true") return "true"; - if (value == "null") return "null"; - if (value == "0") return "0"; - if (value == "string.Empty" || value == "\"\"") return "\"\""; - if (value.StartsWith("new ")) return "new()"; - - return value; - } - - private string SimplifyTypeName(string typeName) - { - // Remove common namespace prefixes - var result = typeName - .Replace("System.", "") - .Replace("Collections.Generic.", "") - .Replace("Threading.Tasks.", ""); - - // Handle Nullable -> T? (must be done carefully to not break other generics) - result = NullableRegex().Replace(result, "$1?"); - - // Simplify primitive type names - result = result - .Replace("Int32", "int") - .Replace("Int64", "long") - .Replace("Boolean", "bool") - .Replace("String", "string") - .Replace("Object", "object"); - - return result; - } - - [GeneratedRegex(@"Nullable<([^>]+)>")] - private static partial Regex NullableRegex(); - - private bool HasAttribute(MemberDeclarationSyntax member, string attributeName) - { - return member.AttributeLists - .SelectMany(a => a.Attributes) - .Any(a => a.Name.ToString() == attributeName || - a.Name.ToString() == attributeName + "Attribute"); - } - - private string? GetObsoleteMessage(PropertyDeclarationSyntax property) - { - var obsoleteAttr = property.AttributeLists - .SelectMany(a => a.Attributes) - .FirstOrDefault(a => a.Name.ToString() is "Obsolete" or "ObsoleteAttribute"); - - if (obsoleteAttr?.ArgumentList?.Arguments.Count > 0) - { - return obsoleteAttr.ArgumentList.Arguments[0].ToString().Trim('"'); - } - - return null; - } - - private string GetRelativePath(string fullPath) - { - var basePath = Path.GetDirectoryName(Path.GetDirectoryName(_sourcePath))!; - return Path.GetRelativePath(basePath, fullPath).Replace('\\', '/'); - } - - private string? FindSamplePath(string componentName) - { - if (!Directory.Exists(_samplesPath)) - return null; - - // Try common sample file naming patterns - var patterns = new[] - { - $"{componentName}s.razor", - $"{componentName}.razor", - $"{componentName}Demo.razor", - $"{componentName}Sample.razor" - }; - - foreach (var pattern in patterns) - { - var files = Directory.GetFiles(_samplesPath, pattern, SearchOption.AllDirectories); - if (files.Length > 0) - { - return GetRelativePath(files[0]); - } - } - - return null; - } - - [GeneratedRegex(@"\s*(.*?)\s*", RegexOptions.Singleline)] - private static partial Regex SummaryRegex(); -} diff --git a/tools/LlmsDocsGenerator/ComponentInfo.cs b/tools/LlmsDocsGenerator/ComponentInfo.cs deleted file mode 100644 index 4c7ac9cd085..00000000000 --- a/tools/LlmsDocsGenerator/ComponentInfo.cs +++ /dev/null @@ -1,139 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the Apache 2.0 License -// See the LICENSE file in the project root for more information. -// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone - -namespace LlmsDocsGenerator; - -/// -/// Represents information about a Blazor component -/// -public class ComponentInfo -{ - /// - /// Component name (e.g., "Table", "Button") - /// - public string Name { get; set; } = string.Empty; - - /// - /// Full type name including namespace - /// - public string FullName { get; set; } = string.Empty; - - /// - /// XML documentation summary - /// - public string? Summary { get; set; } - - /// - /// Generic type parameters (e.g., "TItem", "TValue") - /// - public List TypeParameters { get; set; } = new(); - - /// - /// Component parameters ([Parameter] properties) - /// - public List Parameters { get; set; } = new(); - - /// - /// Public methods - /// - public List PublicMethods { get; set; } = new(); - - /// - /// Base class name - /// - public string? BaseClass { get; set; } - - /// - /// Source file path - /// - public string SourcePath { get; set; } = string.Empty; - - /// - /// Last modification time of the source file - /// - public DateTime LastModified { get; set; } - - /// - /// Related sample file path (if exists) - /// - public string? SamplePath { get; set; } -} - -/// -/// Represents a component parameter -/// -public class ParameterInfo -{ - /// - /// Parameter name - /// - public string Name { get; set; } = string.Empty; - - /// - /// Parameter type as string - /// - public string Type { get; set; } = string.Empty; - - /// - /// Default value (if any) - /// - public string? DefaultValue { get; set; } - - /// - /// XML documentation summary - /// - public string? Description { get; set; } - - /// - /// Whether this is an EditorRequired parameter - /// - public bool IsRequired { get; set; } - - /// - /// Whether this parameter is obsolete - /// - public bool IsObsolete { get; set; } - - /// - /// Obsolete message (if obsolete) - /// - public string? ObsoleteMessage { get; set; } - - /// - /// Whether this is an EventCallback - /// - public bool IsEventCallback { get; set; } -} - -/// -/// Represents a public method -/// -public class MethodInfo -{ - /// - /// Method name - /// - public string Name { get; set; } = string.Empty; - - /// - /// Return type - /// - public string ReturnType { get; set; } = string.Empty; - - /// - /// Method parameters - /// - public List<(string Type, string Name)> Parameters { get; set; } = new(); - - /// - /// XML documentation summary - /// - public string? Description { get; set; } - - /// - /// Whether this is a JSInvokable method - /// - public bool IsJSInvokable { get; set; } -} diff --git a/tools/LlmsDocsGenerator/DocsGenerator.cs b/tools/LlmsDocsGenerator/DocsGenerator.cs deleted file mode 100644 index f5141654596..00000000000 --- a/tools/LlmsDocsGenerator/DocsGenerator.cs +++ /dev/null @@ -1,243 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the Apache 2.0 License -// See the LICENSE file in the project root for more information. -// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone - -namespace LlmsDocsGenerator; - -/// -/// Main documentation generator class -/// -public class DocsGenerator -{ - private readonly string _outputPath; - private readonly string _componentsOutputPath; - private readonly string _sourcePath; - private readonly ComponentAnalyzer _analyzer; - private readonly MarkdownBuilder _markdownBuilder; - private readonly bool _debug; - - public DocsGenerator(string? rootFolder, bool debug) - { - _debug = debug; - - // Find the source directory (relative to tool location or current directory) - var root = FindSourcePath(rootFolder); - - _sourcePath = Path.Combine(root, "src", "BootstrapBlazor"); - _outputPath = Path.Combine(root, "src", "BootstrapBlazor.Server", "wwwroot", "llms"); - _componentsOutputPath = Path.Combine(_outputPath, "components"); - _analyzer = new ComponentAnalyzer(_sourcePath); - _markdownBuilder = new MarkdownBuilder(); - } - - private string FindSourcePath(string? rootFolder) - { - // Try to find src/BootstrapBlazor from current directory or parent directories - var current = rootFolder ?? AppContext.BaseDirectory; - Logger($"Root path: {current}"); - - while (!string.IsNullOrEmpty(current)) - { - var parent = Directory.GetParent(current); - if (parent == null) - { - break; - } - if (parent.Name.Equals("BootstrapBlazor", StringComparison.OrdinalIgnoreCase)) - { - return parent.FullName; - } - current = parent.FullName; - } - - throw new DirectoryNotFoundException("Could not find src directory. Please run this tool from the BootstrapBlazor repository root."); - } - - /// - /// Generate all documentation files - /// - public async Task GenerateAllAsync() - { - Logger($"Source path: {_sourcePath}"); - Logger($"Output path: {_outputPath}"); - Logger($"Components path: {_componentsOutputPath}"); - - // Ensure output directories exist - Directory.CreateDirectory(_outputPath); - Directory.CreateDirectory(_componentsOutputPath); - - // Analyze all components - Logger("Analyzing components..."); - var components = await _analyzer.AnalyzeAllComponentsAsync(); - Logger($"Found {components.Count} components"); - - // Generate index file - await GenerateIndexAsync(components); - - // Generate individual component documentation files - Logger("Generating individual component documentation..."); - foreach (var component in components) - { - await GenerateComponentDocAsync(component); - } - - Logger("Documentation generation complete!"); - } - - /// - /// Generate only the index file - /// - public async Task GenerateIndexAsync() - { - var components = await _analyzer.AnalyzeAllComponentsAsync(); - await GenerateIndexAsync(components); - } - - private async Task GenerateIndexAsync(List components) - { - // Ensure output directory exists - Directory.CreateDirectory(_outputPath); - - var indexPath = Path.Combine(_outputPath, "llms.txt"); - var content = _markdownBuilder.BuildIndex(components); - await File.WriteAllTextAsync(indexPath, content); - Logger($"Generated: {indexPath}"); - } - - /// - /// Generate documentation for a specific component - /// - public async Task GenerateComponentAsync(string componentName) - { - var component = await _analyzer.AnalyzeComponentAsync(componentName); - if (component == null) - { - Logger($"Component not found: {componentName}"); - return; - } - - // Ensure output directory exists - Directory.CreateDirectory(_componentsOutputPath); - - await GenerateComponentDocAsync(component); - } - - private async Task GenerateComponentDocAsync(ComponentInfo component) - { - var content = _markdownBuilder.BuildComponentDoc(component); - var fileName = $"{component.Name}.txt"; - var filePath = Path.Combine(_componentsOutputPath, fileName); - await File.WriteAllTextAsync(filePath, content); - Logger($"Generated: {filePath}"); - } - - /// - /// Check if documentation is up-to-date - /// - public async Task CheckAsync() - { - Logger("Checking documentation freshness..."); - - var components = await _analyzer.AnalyzeAllComponentsAsync(); - - // Check index file - var indexPath = Path.Combine(_outputPath, "llms.txt"); - if (!File.Exists(indexPath)) - { - Logger("OUTDATED: llms.txt does not exist"); - return false; - } - - var indexLastWrite = File.GetLastWriteTimeUtc(indexPath); - - // compute the most recent component source timestamp: - var newestComponentWrite = components - .Select(c => c.LastModified) - .DefaultIfEmpty(indexLastWrite) - .Max(); - - if (indexLastWrite < newestComponentWrite) - { - Logger("Index file is stale relative to component sources. Please regenerate docs."); - return false; - } - - // Check each component file - foreach (var component in components) - { - var fileName = $"{component.Name}.txt"; - var filePath = Path.Combine(_componentsOutputPath, fileName); - - if (!File.Exists(filePath)) - { - Logger($"OUTDATED: {fileName} does not exist"); - return false; - } - - // Check if source file is newer than the doc file - var docLastWrite = File.GetLastWriteTimeUtc(filePath); - if (component.LastModified > docLastWrite) - { - Logger($"OUTDATED: {component.Name} was modified after {fileName}"); - return false; - } - } - - Logger("Documentation is up-to-date"); - return true; - } - - private static string GetComponentCategory(string componentName) - { - return componentName.ToLowerInvariant() switch - { - // Table family - var n when n.Contains("table") => "table", - - // Input family - var n when n.Contains("input") || n.Contains("textarea") || - n.Contains("password") || n == "otpinput" => "input", - - // Select family - var n when n.Contains("select") || n.Contains("dropdown") || - n.Contains("autocomplete") || n.Contains("cascader") || - n.Contains("transfer") || n.Contains("multiselect") => "select", - - // Button family - var n when n.Contains("button") || n == "gotop" || - n.Contains("popconfirm") => "button", - - // Dialog family - var n when n.Contains("dialog") || n.Contains("modal") || - n.Contains("drawer") || n.Contains("swal") || - n.Contains("toast") || n.Contains("message") => "dialog", - - // Navigation family - var n when n.Contains("menu") || n.Contains("tab") || - n.Contains("breadcrumb") || n.Contains("step") || - n.Contains("anchor") || n.Contains("nav") => "nav", - - // Card/Container family - var n when n.Contains("card") || n.Contains("collapse") || - n.Contains("groupbox") || n.Contains("panel") => "card", - - // TreeView - var n when n.Contains("tree") => "treeview", - - // Form - var n when n.Contains("validateform") || n.Contains("editorform") || - n.Contains("validator") => "form", - - _ => "other" - }; - } - - private void Logger(string message) - { - if (_debug) - { - Console.WriteLine(message); - } - } -} diff --git a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj b/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj deleted file mode 100644 index 61893eceb35..00000000000 --- a/tools/LlmsDocsGenerator/LlmsDocsGenerator.csproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - 10.0.0 - Exe - net10.0 - enable - enable - - - - BootstrapBlazor LLMs docs Generator - BootstrapBlazor.LLMsDocsGenerator - true - llms-docs - ice6 (ice6@live.cn) - Copyright 2026 - BootstrapBlazor - - - - - - - - - - - - diff --git a/tools/LlmsDocsGenerator/MarkdownBuilder.cs b/tools/LlmsDocsGenerator/MarkdownBuilder.cs deleted file mode 100644 index 97c8271f45e..00000000000 --- a/tools/LlmsDocsGenerator/MarkdownBuilder.cs +++ /dev/null @@ -1,399 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the Apache 2.0 License -// See the LICENSE file in the project root for more information. -// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone - -using System.Text; - -namespace LlmsDocsGenerator; - -/// -/// Builds Markdown documentation for components -/// -public class MarkdownBuilder -{ - private const string GitHubBaseUrl = "https://github.com/dotnetcore/BootstrapBlazor/blob/main/"; - private readonly StringBuilder _sb = new(); - - /// - /// Build the main llms.txt index file - /// - public string BuildIndex(List components) - { - _sb.Clear(); - - _sb.AppendLine("# BootstrapBlazor"); - _sb.AppendLine(); - _sb.AppendLine("> Enterprise-class Blazor UI component library based on Bootstrap 5"); - _sb.AppendLine(); - - // Quick Start section - _sb.AppendLine("## Quick Start"); - _sb.AppendLine(); - _sb.AppendLine("```bash"); - _sb.AppendLine("dotnet add package BootstrapBlazor"); - _sb.AppendLine("```"); - _sb.AppendLine(); - _sb.AppendLine("### Configuration"); - _sb.AppendLine(); - _sb.AppendLine("```csharp"); - _sb.AppendLine("// Program.cs"); - _sb.AppendLine("builder.Services.AddBootstrapBlazor();"); - _sb.AppendLine("```"); - _sb.AppendLine(); - _sb.AppendLine("```razor"); - _sb.AppendLine("@* _Imports.razor *@"); - _sb.AppendLine("@using BootstrapBlazor.Components"); - _sb.AppendLine("```"); - _sb.AppendLine(); - _sb.AppendLine("```html"); - _sb.AppendLine(""); - _sb.AppendLine(""); - _sb.AppendLine(""); - _sb.AppendLine("```"); - _sb.AppendLine(); - - // Component List - grouped by category for easy navigation - _sb.AppendLine("## Components"); - _sb.AppendLine(); - _sb.AppendLine("Each component has its own documentation file in the `components/` directory."); - _sb.AppendLine("Use `components/{ComponentName}.txt` to get detailed API information."); - _sb.AppendLine(); - - // Group components by category for the index - var categorized = CategorizeComponents(components); - - var categoryDescriptions = new Dictionary - { - ["table"] = ("Data Display - Table", "Complex data table with sorting, filtering, paging, editing"), - ["input"] = ("Form Inputs", "Text input, number input, textarea, date picker"), - ["select"] = ("Selection Components", "Select, multi-select, autocomplete, cascader, transfer"), - ["button"] = ("Buttons", "Button, button group, dropdown button, split button"), - ["dialog"] = ("Dialogs & Feedback", "Modal, drawer, dialog service, message, toast"), - ["nav"] = ("Navigation", "Menu, tabs, breadcrumb, steps, pagination"), - ["card"] = ("Containers", "Card, collapse, group box, split, layout"), - ["treeview"] = ("Tree Components", "TreeView, tree select"), - ["form"] = ("Form Validation", "ValidateForm, editor form, validation rules"), - ["other"] = ("Other Components", "Miscellaneous components") - }; - - foreach (var (category, categoryComponents) in categorized.OrderBy(c => c.Key)) - { - if (categoryComponents.Count == 0) continue; - - var (title, description) = categoryDescriptions.GetValueOrDefault(category, (category, "")); - _sb.AppendLine($"### {title}"); - _sb.AppendLine(); - _sb.AppendLine($"{description}"); - _sb.AppendLine(); - - // List components with links to their individual docs - foreach (var component in categoryComponents.OrderBy(c => c.Name)) - { - var summary = !string.IsNullOrEmpty(component.Summary) - ? $" - {TruncateSummary(component.Summary, 60)}" - : ""; - _sb.AppendLine($"- [{component.Name}](components/{component.Name}.txt){summary}"); - } - _sb.AppendLine(); - } - - // Source Code Reference - _sb.AppendLine("## Source Code Reference"); - _sb.AppendLine(); - _sb.AppendLine("GitHub Repository: https://github.com/dotnetcore/BootstrapBlazor"); - _sb.AppendLine(); - _sb.AppendLine("When documentation is insufficient, consult the source code:"); - _sb.AppendLine(); - _sb.AppendLine("### File Structure"); - _sb.AppendLine(); - _sb.AppendLine("```"); - _sb.AppendLine($"{GitHubBaseUrl}src/BootstrapBlazor/Components/{{ComponentName}}/"); - _sb.AppendLine("├── {Component}.razor # Razor template"); - _sb.AppendLine("├── {Component}.razor.cs # Component logic & parameters"); - _sb.AppendLine("├── {Component}Base.cs # Base class (if exists)"); - _sb.AppendLine("├── {Component}Option.cs # Configuration options"); - _sb.AppendLine("└── {Component}Service.cs # Service class (Dialog, Toast, etc.)"); - _sb.AppendLine("```"); - _sb.AppendLine(); - _sb.AppendLine("### Examples"); - _sb.AppendLine(); - _sb.AppendLine("```"); - _sb.AppendLine($"{GitHubBaseUrl}src/BootstrapBlazor.Server/Components/Samples/{{ComponentName}}s.razor"); - _sb.AppendLine("```"); - _sb.AppendLine(); - _sb.AppendLine("### Reading Component Parameters"); - _sb.AppendLine(); - _sb.AppendLine("Look for properties with `[Parameter]` attribute:"); - _sb.AppendLine(); - _sb.AppendLine("```csharp"); - _sb.AppendLine("/// "); - _sb.AppendLine("/// Gets or sets whether to show the toolbar"); - _sb.AppendLine("/// "); - _sb.AppendLine("[Parameter]"); - _sb.AppendLine("public bool ShowToolbar { get; set; }"); - _sb.AppendLine("```"); - _sb.AppendLine(); - - // Footer - _sb.AppendLine("---"); - _sb.AppendLine($"Generated: {DateTime.UtcNow:yyyy-MM-dd}"); - _sb.AppendLine($"Total Components: {components.Count}"); - _sb.AppendLine($"Repository: {GitHubBaseUrl}"); - - return _sb.ToString(); - } - - private static Dictionary> CategorizeComponents(List components) - { - var categories = new Dictionary> - { - ["table"] = [], - ["input"] = [], - ["select"] = [], - ["button"] = [], - ["dialog"] = [], - ["nav"] = [], - ["card"] = [], - ["treeview"] = [], - ["form"] = [], - ["other"] = [] - }; - - foreach (var component in components) - { - var category = GetComponentCategory(component.Name); - if (categories.TryGetValue(category, out var list)) - { - list.Add(component); - } - else - { - categories["other"].Add(component); - } - } - - // Remove empty categories - return categories.Where(c => c.Value.Count > 0) - .ToDictionary(c => c.Key, c => c.Value); - } - - private static string GetComponentCategory(string componentName) - { - return componentName.ToLowerInvariant() switch - { - var n when n.Contains("table") => "table", - var n when n.Contains("input") || n.Contains("textarea") || - n.Contains("password") || n == "otpinput" => "input", - var n when n.Contains("select") || n.Contains("dropdown") || - n.Contains("autocomplete") || n.Contains("cascader") || - n.Contains("transfer") || n.Contains("multiselect") => "select", - var n when n.Contains("button") || n == "gotop" || - n.Contains("popconfirm") => "button", - var n when n.Contains("dialog") || n.Contains("modal") || - n.Contains("drawer") || n.Contains("swal") || - n.Contains("toast") || n.Contains("message") => "dialog", - var n when n.Contains("menu") || n.Contains("tab") || - n.Contains("breadcrumb") || n.Contains("step") || - n.Contains("anchor") || n.Contains("nav") => "nav", - var n when n.Contains("card") || n.Contains("collapse") || - n.Contains("groupbox") || n.Contains("panel") => "card", - var n when n.Contains("tree") => "treeview", - var n when n.Contains("validateform") || n.Contains("editorform") || - n.Contains("validator") => "form", - _ => "other" - }; - } - - private static string TruncateSummary(string summary, int maxLength) - { - if (string.IsNullOrEmpty(summary)) return ""; - summary = summary.Replace("\n", " ").Replace("\r", "").Trim(); - return summary.Length <= maxLength ? summary : summary[..(maxLength - 3)] + "..."; - } - - /// - /// Build documentation for a single component - /// - public string BuildComponentDoc(ComponentInfo component) - { - _sb.Clear(); - - _sb.AppendLine($"# BootstrapBlazor {component.Name}"); - _sb.AppendLine(); - - if (!string.IsNullOrEmpty(component.Summary)) - { - _sb.AppendLine($"> {component.Summary}"); - _sb.AppendLine(); - } - - BuildComponentSection(component, includeHeader: false); - - // Footer - _sb.AppendLine("---"); - _sb.AppendLine($""); - - return _sb.ToString(); - } - - private void BuildComponentSection(ComponentInfo component, bool includeHeader = true) - { - if (includeHeader) - { - _sb.AppendLine($"## {component.Name}"); - _sb.AppendLine(); - - if (!string.IsNullOrEmpty(component.Summary)) - { - _sb.AppendLine(component.Summary); - _sb.AppendLine(); - } - } - - // Type parameters - if (component.TypeParameters.Count > 0) - { - _sb.AppendLine("### Type Parameters"); - _sb.AppendLine(); - foreach (var tp in component.TypeParameters) - { - _sb.AppendLine($"- `{tp}` - Generic type parameter"); - } - _sb.AppendLine(); - } - - // Base class info - if (!string.IsNullOrEmpty(component.BaseClass)) - { - _sb.AppendLine($"**Inherits from**: `{component.BaseClass}`"); - _sb.AppendLine(); - } - - // Parameters table - if (component.Parameters.Count > 0) - { - _sb.AppendLine("### Parameters"); - _sb.AppendLine(); - _sb.AppendLine(""); - _sb.AppendLine(); - _sb.AppendLine("| Parameter | Type | Default | Description |"); - _sb.AppendLine("|-----------|------|---------|-------------|"); - - // Sort: required first, then events, then alphabetically - var sortedParams = component.Parameters - .OrderByDescending(p => p.IsRequired) - .ThenBy(p => p.IsEventCallback) - .ThenBy(p => p.Name); - - foreach (var param in sortedParams) - { - var required = param.IsRequired ? " **[Required]**" : ""; - var description = EscapeMarkdownCell(param.Description ?? "") + required; - var defaultVal = param.DefaultValue ?? "-"; - var type = EscapeMarkdownCell(param.Type); - - _sb.AppendLine($"| {param.Name} | `{type}` | {defaultVal} | {description} |"); - } - - _sb.AppendLine(); - _sb.AppendLine(""); - _sb.AppendLine(); - } - - // Event callbacks (separate section for clarity) - var eventCallbacks = component.Parameters.Where(p => p.IsEventCallback).ToList(); - if (eventCallbacks.Count > 0) - { - _sb.AppendLine("### Event Callbacks"); - _sb.AppendLine(); - _sb.AppendLine("| Event | Type | Description |"); - _sb.AppendLine("|-------|------|-------------|"); - - foreach (var evt in eventCallbacks.OrderBy(e => e.Name)) - { - var description = EscapeMarkdownCell(evt.Description ?? ""); - var type = EscapeMarkdownCell(evt.Type); - _sb.AppendLine($"| {evt.Name} | `{type}` | {description} |"); - } - - _sb.AppendLine(); - } - - // Public methods - if (component.PublicMethods.Count > 0) - { - _sb.AppendLine("### Public Methods"); - _sb.AppendLine(); - - foreach (var method in component.PublicMethods.OrderBy(m => m.Name)) - { - var paramStr = string.Join(", ", method.Parameters.Select(p => $"{p.Item1} {p.Item2}")); - _sb.AppendLine($"- `{method.ReturnType} {method.Name}({paramStr})`"); - if (!string.IsNullOrEmpty(method.Description)) - { - _sb.AppendLine($" - {method.Description}"); - } - if (method.IsJSInvokable) - { - _sb.AppendLine(" - *[JSInvokable]*"); - } - } - - _sb.AppendLine(); - } - - // Source reference with GitHub URLs - if (!string.IsNullOrEmpty(component.SourcePath)) - { - _sb.AppendLine("### Source"); - _sb.AppendLine(); - var sourceUrl = $"{GitHubBaseUrl}{component.SourcePath}"; - _sb.AppendLine($"- Component: [{component.SourcePath}]({sourceUrl})"); - if (!string.IsNullOrEmpty(component.SamplePath)) - { - var sampleUrl = $"{GitHubBaseUrl}{component.SamplePath}"; - _sb.AppendLine($"- Examples: [{component.SamplePath}]({sampleUrl})"); - } - _sb.AppendLine(); - } - } - - /// - /// Build a minimal parameter table for embedding in existing docs - /// - public string BuildParameterTable(List parameters) - { - _sb.Clear(); - - _sb.AppendLine("| Parameter | Type | Default | Description |"); - _sb.AppendLine("|-----------|------|---------|-------------|"); - - var sortedParams = parameters - .OrderByDescending(p => p.IsRequired) - .ThenBy(p => p.IsEventCallback) - .ThenBy(p => p.Name); - - foreach (var param in sortedParams) - { - var required = param.IsRequired ? " **[Required]**" : ""; - var description = EscapeMarkdownCell(param.Description ?? "") + required; - var defaultVal = param.DefaultValue ?? "-"; - var type = EscapeMarkdownCell(param.Type); - - _sb.AppendLine($"| {param.Name} | `{type}` | {defaultVal} | {description} |"); - } - - return _sb.ToString(); - } - - private static string EscapeMarkdownCell(string text) - { - if (string.IsNullOrEmpty(text)) return ""; - - return text - .Replace("|", "\\|") - .Replace("\n", " ") - .Replace("\r", ""); - } -} diff --git a/tools/LlmsDocsGenerator/Program.cs b/tools/LlmsDocsGenerator/Program.cs deleted file mode 100644 index 88eec57f4ab..00000000000 --- a/tools/LlmsDocsGenerator/Program.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the Apache 2.0 License -// See the LICENSE file in the project root for more information. -// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone - -using LlmsDocsGenerator; -using System.CommandLine; - -var componentOption = new Option("--component") { Description = "Generate documentation for a specific component only" }; -var indexOnlyOption = new Option("--index-only") { Description = "Generate only the index file (llms.txt)" }; -var checkOption = new Option("--check") { Description = "Check if documentation is up-to-date (for CI/CD)" }; -var rootFolderOption = new Option("--root") { Description = "Set the root folder of project" }; -var debugOption = new Option("--debug") { Description = "Set the environment to development and display debugging information." }; - -var rootCommand = new RootCommand("BootstrapBlazor LLMs Documentation Generator") -{ - componentOption, - indexOnlyOption, - checkOption, - rootFolderOption, - debugOption -}; - -rootCommand.SetAction(async result => -{ - var debug = result.GetValue(debugOption); - var rootFolder = result.GetValue(rootFolderOption); - var generator = new DocsGenerator(rootFolder, debug); - - var check = result.GetValue(checkOption); - if (check) - { - var isUpToDate = await generator.CheckAsync(); - Environment.ExitCode = isUpToDate ? 0 : 1; - return; - } - - var indexOnly = result.GetValue(indexOnlyOption); - if (indexOnly) - { - await generator.GenerateIndexAsync(); - return; - } - - var component = result.GetValue(componentOption); - if (!string.IsNullOrEmpty(component)) - { - await generator.GenerateComponentAsync(component); - return; - } - - await generator.GenerateAllAsync(); -}); - -return await rootCommand.Parse(args).InvokeAsync(); diff --git a/tools/LlmsDocsGenerator/README.md b/tools/LlmsDocsGenerator/README.md deleted file mode 100644 index 246c5d66bdb..00000000000 --- a/tools/LlmsDocsGenerator/README.md +++ /dev/null @@ -1,245 +0,0 @@ -# LlmsDocsGenerator - -A tool that automatically generates LLM-friendly documentation for BootstrapBlazor components. - -## Purpose - -AI coding assistants (Claude Code, Cursor, GitHub Copilot) often generate incorrect UI code because they lack accurate component API information. This tool solves that problem by: - -1. **Auto-generating parameter tables** from source code using Roslyn -2. **Providing GitHub source links** for deeper reference -3. **Integrating with CI/CD** to keep docs synchronized with code - -## Architecture - -``` -┌─────────────────────────────────────────────────────────────┐ -│ LlmsDocsGenerator │ -├─────────────────────────────────────────────────────────────┤ -│ ComponentAnalyzer → Roslyn-based source code parser │ -│ MarkdownBuilder → Generates markdown documentation │ -│ DocsGenerator → Orchestrates the generation flow │ -└─────────────────────────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────────────┐ -│ Output: wwwroot/llms/ │ -├─────────────────────────────────────────────────────────────┤ -│ llms.txt → Index with quick start guide │ -│ components/ → Individual component documentation │ -│ ├── Button.txt → Button component API reference │ -│ ├── Table.txt → Table component API reference │ -│ ├── Select.txt → Select component API reference │ -│ ├── Modal.txt → Modal component API reference │ -│ └── ... → One file per component │ -└─────────────────────────────────────────────────────────────┘ -``` - -### Why One File Per Component? - -This design optimizes for LLM and Code Agent consumption: - -| Aspect | Per-Category (Old) | Per-Component (New) | -|--------|-------------------|---------------------| -| **Precision** | ❌ Loads unrelated components | ✅ Only needed API info | -| **Token Efficiency** | ❌ Wastes tokens on irrelevant data | ✅ Minimal context loading | -| **Cache Friendly** | ❌ Regenerates entire category | ✅ Updates single file | -| **RAG Retrieval** | ❌ Coarse-grained matches | ✅ Fine-grained matches | -| **Incremental Updates** | ❌ Complex CI/CD checks | ✅ Simple file mapping | - -## How It Works - -### 1. Source Code Analysis - -The `ComponentAnalyzer` uses Roslyn to parse C# source files: - -```csharp -// Scans for [Parameter] attributes -var parameters = classDeclaration.DescendantNodes() - .OfType() - .Where(p => HasAttribute(p, "Parameter")); - -// Extracts XML documentation comments -var summary = ExtractXmlSummary(property); -``` - -### 2. Documentation Generation - -The `MarkdownBuilder` creates structured markdown with: - -- Parameter tables (name, type, default, description) -- Event callbacks section -- Public methods -- GitHub source links - -### 3. Component Organization - -Components are organized in the index by category for easy navigation, but each component has its own dedicated documentation file: - -| Category | Example Components | -|----------|-------------------| -| table | Table, SelectTable, TableToolbar | -| input | BootstrapInput, Textarea, OtpInput | -| select | Select, AutoComplete, Cascader | -| button | Button, PopConfirmButton | -| dialog | Modal, Drawer, Toast | -| nav | Menu, Tab, Breadcrumb | -| card | Card, Collapse, GroupBox | -| treeview | TreeView, Tree | -| form | ValidateForm, EditorForm | -| other | All other components | - -## Installation - -### Install as Global Tool - -```bash -dotnet pack tools/LlmsDocsGenerator -dotnet tool install --global --add-source ./tools/LlmsDocsGenerator/bin/Release BootstrapBlazor.LlmsDocsGenerator -``` - -Or install from NuGet (once published): - -```bash -dotnet tool install --global BootstrapBlazor.LlmsDocsGenerator -``` - -### Update Tool - -```bash -dotnet tool update --global BootstrapBlazor.LlmsDocsGenerator -``` - -### Uninstall Tool - -```bash -dotnet tool uninstall --global BootstrapBlazor.LlmsDocsGenerator -``` - -## Usage - -Once installed as a global tool, use the `llms-docs` command: - -### Generate All Documentation - -```bash -llms-docs -``` - -Or when running from source: - -```bash -dotnet run --project tools/LlmsDocsGenerator -``` - -### Generate Specific Component - -```bash -llms-docs --component Table -``` - -### Generate Index Only - -```bash -llms-docs --index-only -``` - -### Check Freshness (CI/CD) - -```bash -llms-docs --check -``` - -Returns exit code 1 if documentation is outdated. - -### Custom Output Directory - -```bash -llms-docs --output ./docs -``` - -### Show Help - -```bash -llms-docs --help -``` - -## CI/CD Integration - -### Build Workflow (build.yml) - -Checks if documentation is up-to-date on every push to main: - -```yaml -- name: Check LLM Documentation - run: dotnet run --project tools/LlmsDocsGenerator -- --check -``` - -### Docker Workflow (docker.yml) - -Regenerates documentation before building the doc site: - -```yaml -- name: Generate LLM Documentation - run: dotnet run --project tools/LlmsDocsGenerator -``` - -### Dockerfile - -Generates documentation during container build: - -```dockerfile -WORKDIR /tools/LlmsDocsGenerator -RUN dotnet run -``` - -## Output Format - -Each component documentation includes: - -```markdown -## ComponentName - -Description from XML comments - -### Type Parameters -- `TItem` - Generic type parameter - -### Parameters -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| Items | `List` | - | Data source | -| ShowToolbar | `bool` | false | Show toolbar | - -### Event Callbacks -| Event | Type | Description | -|-------|------|-------------| -| OnClick | `EventCallback` | Click handler | - -### Public Methods -- `Task RefreshAsync()` - Refresh data - -### Source -- Component: [src/.../Component.razor.cs](GitHub URL) -- Examples: [src/.../Samples/Components.razor](GitHub URL) -``` - -## For Library Users - -Users can reference this documentation in their own projects by creating a `llms.txt`: - -```markdown -# My Project - -## Dependencies - -### BootstrapBlazor -- Documentation Index: https://www.blazor.zone/llms/llms.txt -- Button: https://www.blazor.zone/llms/components/Button.txt -- Table: https://www.blazor.zone/llms/components/Table.txt -- Modal: https://www.blazor.zone/llms/components/Modal.txt -``` - -LLM agents can: -1. First read `llms.txt` to discover available components -2. Then fetch specific `components/{ComponentName}.txt` for detailed API info diff --git a/tools/LlmsDocsGenerator/README.zh-CN.md b/tools/LlmsDocsGenerator/README.zh-CN.md deleted file mode 100644 index e3163ed3e59..00000000000 --- a/tools/LlmsDocsGenerator/README.zh-CN.md +++ /dev/null @@ -1,266 +0,0 @@ -# LlmsDocsGenerator - -自动为 BootstrapBlazor 组件生成 LLM 友好文档的工具。 - -## 目的 - -AI 编程助手(Claude Code、Cursor、GitHub Copilot)经常因为缺乏准确的组件 API 信息而生成错误的 UI 代码。本工具通过以下方式解决这个问题: - -1. **使用 Roslyn 自动生成参数表** - 从源代码提取 -2. **提供 GitHub 源码链接** - 方便深入查阅 -3. **集成 CI/CD** - 确保文档与代码同步 - -## 架构 - -``` -┌─────────────────────────────────────────────────────────────┐ -│ LlmsDocsGenerator │ -├─────────────────────────────────────────────────────────────┤ -│ ComponentAnalyzer → 基于 Roslyn 的源码解析器 │ -│ MarkdownBuilder → 生成 Markdown 文档 │ -│ DocsGenerator → 协调生成流程 │ -└─────────────────────────────────────────────────────────────┘ - │ - ▼ -┌─────────────────────────────────────────────────────────────┐ -│ 输出目录: wwwroot/llms/ │ -├─────────────────────────────────────────────────────────────┤ -│ llms.txt → 索引文件,包含快速入门指南 │ -│ components/ → 单独的组件文档目录 │ -│ ├── Button.txt → Button 组件 API 参考 │ -│ ├── Table.txt → Table 组件 API 参考 │ -│ ├── Select.txt → Select 组件 API 参考 │ -│ ├── Modal.txt → Modal 组件 API 参考 │ -│ └── ... → 每个组件一个文件 │ -└─────────────────────────────────────────────────────────────┘ -``` - -### 为什么每个组件单独一个文件? - -这种设计针对 LLM 和 Code Agent 进行了优化: - -| 方面 | 按分类(旧方案) | 按组件(新方案) | -|------|-----------------|-----------------| -| **精确性** | ❌ 加载无关组件 | ✅ 只加载需要的 API | -| **Token 效率** | ❌ 浪费 token 在无关数据上 | ✅ 最小化上下文加载 | -| **缓存友好** | ❌ 需重新生成整个分类 | ✅ 只更新单个文件 | -| **RAG 检索** | ❌ 粗粒度匹配 | ✅ 细粒度匹配 | -| **增量更新** | ❌ CI/CD 检查复杂 | ✅ 简单的文件映射 | - -## 工作原理 - -### 1. 源码分析 - -`ComponentAnalyzer` 使用 Roslyn 解析 C# 源文件: - -```csharp -// 扫描 [Parameter] 特性 -var parameters = classDeclaration.DescendantNodes() - .OfType() - .Where(p => HasAttribute(p, "Parameter")); - -// 提取 XML 文档注释 -var summary = ExtractXmlSummary(property); -``` - -### 2. 文档生成 - -`MarkdownBuilder` 生成结构化的 Markdown,包含: - -- 参数表(名称、类型、默认值、描述) -- 事件回调部分 -- 公共方法 -- GitHub 源码链接 - -### 3. 组件组织 - -组件在索引中按类别组织便于导航,但每个组件有独立的文档文件: - -| 类别 | 组件示例 | -|------|----------| -| table | Table, SelectTable, TableToolbar | -| input | BootstrapInput, Textarea, OtpInput | -| select | Select, AutoComplete, Cascader | -| button | Button, PopConfirmButton | -| dialog | Modal, Drawer, Toast | -| nav | Menu, Tab, Breadcrumb | -| card | Card, Collapse, GroupBox | -| treeview | TreeView, Tree | -| form | ValidateForm, EditorForm | -| other | 其他所有组件 | - -## 安装 - -### 作为全局工具安装 - -```bash -dotnet pack tools/LlmsDocsGenerator -dotnet tool install --global --add-source ./tools/LlmsDocsGenerator/bin/Release BootstrapBlazor.LlmsDocsGenerator -``` - -或从 NuGet 安装(发布后): - -```bash -dotnet tool install --global BootstrapBlazor.LlmsDocsGenerator -``` - -### 更新工具 - -```bash -dotnet tool update --global BootstrapBlazor.LlmsDocsGenerator -``` - -### 卸载工具 - -```bash -dotnet tool uninstall --global BootstrapBlazor.LlmsDocsGenerator -``` - -## 使用方法 - -安装为全局工具后,使用 `llms-docs` 命令: - -### 生成所有文档 - -```bash -llms-docs -``` - -或从源代码运行: - -```bash -dotnet run --project tools/LlmsDocsGenerator -``` - -### 生成特定组件 - -```bash -llms-docs --component Table -``` - -### 仅生成索引 - -```bash -llms-docs --index-only -``` - -### 检查文档是否过期(CI/CD) - -```bash -llms-docs --check -``` - -如果文档过期,返回退出码 1。 - -### 自定义输出目录 - -```bash -llms-docs --output ./docs -``` - -### 显示帮助 - -```bash -llms-docs --help -``` - -## CI/CD 集成 - -### 构建工作流 (build.yml) - -每次推送到 main 分支时检查文档是否最新: - -```yaml -- name: Check LLM Documentation - run: dotnet run --project tools/LlmsDocsGenerator -- --check -``` - -### Docker 工作流 (docker.yml) - -构建文档站点前重新生成文档: - -```yaml -- name: Generate LLM Documentation - run: dotnet run --project tools/LlmsDocsGenerator -``` - -### Dockerfile - -容器构建时生成文档: - -```dockerfile -WORKDIR /tools/LlmsDocsGenerator -RUN dotnet run -``` - -## 输出格式 - -每个组件的文档包含: - -```markdown -## 组件名称 - -来自 XML 注释的描述 - -### 类型参数 -- `TItem` - 泛型类型参数 - -### 参数 -| 参数 | 类型 | 默认值 | 描述 | -|------|------|--------|------| -| Items | `List` | - | 数据源 | -| ShowToolbar | `bool` | false | 显示工具栏 | - -### 事件回调 -| 事件 | 类型 | 描述 | -|------|------|------| -| OnClick | `EventCallback` | 点击处理器 | - -### 公共方法 -- `Task RefreshAsync()` - 刷新数据 - -### 源码 -- 组件: [src/.../Component.razor.cs](GitHub 链接) -- 示例: [src/.../Samples/Components.razor](GitHub 链接) -``` - -## 库用户使用指南 - -用户可以在自己的项目中创建 `llms.txt` 来引用本文档: - -```markdown -# 我的项目 - -## 依赖 - -### BootstrapBlazor -- 文档索引: https://www.blazor.zone/llms/llms.txt -- Button: https://www.blazor.zone/llms/components/Button.txt -- Table: https://www.blazor.zone/llms/components/Table.txt -- Modal: https://www.blazor.zone/llms/components/Modal.txt -``` - -LLM 代理可以: -1. 先读取 `llms.txt` 了解有哪些组件 -2. 然后获取 `components/{ComponentName}.txt` 获取详细 API 信息 - -## 设计理念 - -### 为什么需要这个工具? - -| 问题 | 解决方案 | -|------|----------| -| AI 生成错误的组件代码 | 提供准确的参数文档 | -| 手动维护文档容易过期 | 自动从源码生成 | -| 文档太大占用上下文 | 每组件单独文件,按需加载 | -| 用户不知道如何引用 | 提供项目模板 | - -### 混合文档策略 - -``` -AI 代理工作流程: -1. 读取 llms.txt (轻量索引) → 快速了解组件列表 -2. 按需读取 components/{Component}.txt → 获取精确的 API 参考 -3. 不确定时查阅 GitHub 源码 → 获取准确信息 -4. 参考 Samples 目录 → 学习官方用法 -``` From 260b7fc83158a7d874af03843a227c41f4b095ae Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 3 Jan 2026 18:29:01 +0800 Subject: [PATCH 33/34] =?UTF-8?q?revert:=20=E6=92=A4=E9=94=80=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index a98c032f2fd..7950f03b82d 100644 --- a/README.md +++ b/README.md @@ -93,27 +93,27 @@ This project includes LLM-friendly documentation to help AI coding assistants (C ### Online Access -Documentation files are available at: `https://www.blazor.zone/llms/` +Documentation files are available at: `https://www.blazor.zone/llmstxt/` | File | URL | |------|-----| -| Index | https://www.blazor.zone/llms/llms.txt | -| Table | https://www.blazor.zone/llms/llms-table.txt | -| Input | https://www.blazor.zone/llms/llms-input.txt | -| Select | https://www.blazor.zone/llms/llms-select.txt | -| Button | https://www.blazor.zone/llms/llms-button.txt | -| Dialog | https://www.blazor.zone/llms/llms-dialog.txt | -| Nav | https://www.blazor.zone/llms/llms-nav.txt | -| Card | https://www.blazor.zone/llms/llms-card.txt | -| TreeView | https://www.blazor.zone/llms/llms-treeview.txt | -| Form | https://www.blazor.zone/llms/llms-form.txt | -| Other | https://www.blazor.zone/llms/llms-other.txt | +| Index | https://www.blazor.zone/llmstxt/llms.txt | +| Table | https://www.blazor.zone/llmstxt/llms-table.txt | +| Input | https://www.blazor.zone/llmstxt/llms-input.txt | +| Select | https://www.blazor.zone/llmstxt/llms-select.txt | +| Button | https://www.blazor.zone/llmstxt/llms-button.txt | +| Dialog | https://www.blazor.zone/llmstxt/llms-dialog.txt | +| Nav | https://www.blazor.zone/llmstxt/llms-nav.txt | +| Card | https://www.blazor.zone/llmstxt/llms-card.txt | +| TreeView | https://www.blazor.zone/llmstxt/llms-treeview.txt | +| Form | https://www.blazor.zone/llmstxt/llms-form.txt | +| Other | https://www.blazor.zone/llmstxt/llms-other.txt | ### Using in Your Project Create a `llms.txt` in your project root to reference BootstrapBlazor documentation. -See the full example template: https://www.blazor.zone/llms/llms-example-project.txt +See the full example template: https://www.blazor.zone/llmstxt/llms-example-project.txt Quick example: @@ -124,12 +124,12 @@ Quick example: ### BootstrapBlazor - NuGet: BootstrapBlazor -- Documentation: https://www.blazor.zone/llms/llms.txt +- Documentation: https://www.blazor.zone/llmstxt/llms.txt - Source Code: https://github.com/dotnetcore/BootstrapBlazor For component parameters and usage: -- Table: https://www.blazor.zone/llms/llms-table.txt -- Dialog: https://www.blazor.zone/llms/llms-dialog.txt +- Table: https://www.blazor.zone/llmstxt/llms-table.txt +- Dialog: https://www.blazor.zone/llmstxt/llms-dialog.txt - ... (add others as needed) ``` From 89f0100ed4162e3fc69a139b626bba7454d88e17 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sat, 3 Jan 2026 18:31:23 +0800 Subject: [PATCH 34/34] =?UTF-8?q?revert:=20=E6=92=A4=E9=94=80=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 58 ------------------------------------------------------- 1 file changed, 58 deletions(-) diff --git a/README.md b/README.md index 7950f03b82d..0fada1c6027 100644 --- a/README.md +++ b/README.md @@ -87,64 +87,6 @@ dotnet new install Bootstrap.Blazor.Templates::* dotnet new bbapp ``` -## For AI Code Agents - -This project includes LLM-friendly documentation to help AI coding assistants (Claude Code, Cursor, GitHub Copilot, etc.) generate correct component usage. - -### Online Access - -Documentation files are available at: `https://www.blazor.zone/llmstxt/` - -| File | URL | -|------|-----| -| Index | https://www.blazor.zone/llmstxt/llms.txt | -| Table | https://www.blazor.zone/llmstxt/llms-table.txt | -| Input | https://www.blazor.zone/llmstxt/llms-input.txt | -| Select | https://www.blazor.zone/llmstxt/llms-select.txt | -| Button | https://www.blazor.zone/llmstxt/llms-button.txt | -| Dialog | https://www.blazor.zone/llmstxt/llms-dialog.txt | -| Nav | https://www.blazor.zone/llmstxt/llms-nav.txt | -| Card | https://www.blazor.zone/llmstxt/llms-card.txt | -| TreeView | https://www.blazor.zone/llmstxt/llms-treeview.txt | -| Form | https://www.blazor.zone/llmstxt/llms-form.txt | -| Other | https://www.blazor.zone/llmstxt/llms-other.txt | - -### Using in Your Project - -Create a `llms.txt` in your project root to reference BootstrapBlazor documentation. - -See the full example template: https://www.blazor.zone/llmstxt/llms-example-project.txt - -Quick example: - -```markdown -# My Project - -## Dependencies - -### BootstrapBlazor -- NuGet: BootstrapBlazor -- Documentation: https://www.blazor.zone/llmstxt/llms.txt -- Source Code: https://github.com/dotnetcore/BootstrapBlazor - -For component parameters and usage: -- Table: https://www.blazor.zone/llmstxt/llms-table.txt -- Dialog: https://www.blazor.zone/llmstxt/llms-dialog.txt -- ... (add others as needed) -``` - -### Regenerate Documentation - -```bash -dotnet run --project tools/LlmsDocsGenerator -``` - -### Check Documentation Freshness - -```bash -dotnet run --project tools/LlmsDocsGenerator -- --check -``` - ## Contribution 1. Fork 2. Create Feat_xxx branch