diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ee68c3d9..f37d3d57 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,4 +1,4 @@
-name: .NET
+name: 编译 & 测试
on:
push:
@@ -13,11 +13,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Setup .NET
+ - name: 配置 .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- - name: Restore dependencies
+ - name: 还原包
run: dotnet restore
- - name: Build
+ - name: 编译
run: dotnet build --no-restore
+ - name: 测试
+ run: dotnet test
diff --git a/doc/TDesignBlazor.Docs.Shared/Components/Example.razor b/doc/TDesignBlazor.Docs.Shared/Components/Example.razor
index 3393fe51..c3f706e2 100644
--- a/doc/TDesignBlazor.Docs.Shared/Components/Example.razor
+++ b/doc/TDesignBlazor.Docs.Shared/Components/Example.razor
@@ -3,7 +3,7 @@
@Title
@if (Description is not null)
{
- @Description
+ @Description
}
@*
@@ -18,11 +18,11 @@
- @RunContent
+ @RunContent
@@ -37,11 +37,11 @@
[Parameter] public RenderFragment Description { get; set; }
[Parameter] public RenderFragment CodeContent { get; set; }
[Parameter] public RenderFragment RunContent { get; set; }
- [Parameter]public string? RunStyle{ get; set; }
+ [Parameter] public string? RunStyle { get; set; }
bool Active = false;
- string GetStyle() =>Active?"": "display:none";
+ string GetStyle() => Active ? "" : "display:none";
string CodeClass => HtmlHelper.CreateCssBuilder().Append("content code")
//.Append(Active, "code-collapse", "code-expand")
.ToString()
@@ -55,3 +55,4 @@
StateHasChanged();
}
}
+
diff --git a/doc/TDesignBlazor.Docs.Shared/Layouts/MainLayout.razor b/doc/TDesignBlazor.Docs.Shared/Layouts/MainLayout.razor
index c9d7eb20..4f51fba6 100644
--- a/doc/TDesignBlazor.Docs.Shared/Layouts/MainLayout.razor
+++ b/doc/TDesignBlazor.Docs.Shared/Layouts/MainLayout.razor
@@ -6,7 +6,7 @@
- 基于 TDesignBlazor 的 Blazor 企业级组件库
+ 基于 TDesign 的 Blazor 企业级组件库
@@ -20,7 +20,7 @@
-
+
diff --git a/doc/TDesignBlazor.Docs.Shared/Layouts/NavMenu.razor b/doc/TDesignBlazor.Docs.Shared/Layouts/NavMenu.razor
index 96370825..98c3822d 100644
--- a/doc/TDesignBlazor.Docs.Shared/Layouts/NavMenu.razor
+++ b/doc/TDesignBlazor.Docs.Shared/Layouts/NavMenu.razor
@@ -37,6 +37,7 @@
+
diff --git a/doc/TDesignBlazor.Docs.Shared/Pages/Components/ProgressPage.razor b/doc/TDesignBlazor.Docs.Shared/Pages/Components/ProgressPage.razor
new file mode 100644
index 00000000..ad4312df
--- /dev/null
+++ b/doc/TDesignBlazor.Docs.Shared/Pages/Components/ProgressPage.razor
@@ -0,0 +1,154 @@
+@page "/components/progress"
+
+展示操作的当前进度。
+
+
+
+ 以线形表示进度的组件,可以选择性地配有文字或图标补充显示进度和状态。多用于信息量较为丰富的情况。
+
+ 默认在线形外展示进度和状态
+
+
+ 默认样式
+
+
+
+ 100%
+
+
+
+ 进度完成
+
+
+
+ 进度状态发生重大错误
+
+
+
+ 进度被中断
+
+
+
+ 可以在线形内展示进度信息
+
+
+ 默认样式
+
+
+
+ 进度0-10%时数字位置出现在目前进度的右边区域
+
+
+
+
+
+ @Code.Create(@"
+```html
+默认在线形外展示进度和状态
+默认样式
+
+
+100%
+
+
+进度完成
+
+
+进度状态发生重大错误
+
+
+进度被中断
+
+
+
+可以在线形内展示进度信息
+默认样式
+
+
+进度0-10%时数字位置出现在目前进度的右边区域
+
+```
+")
+
+
+
+ 以线形表示进度的组件,环内可选择性地配有文字或图标补充显示进度和状态。多用于需要强调进度百分比的情况。
+
+
+
+ 默认样式
+
+
+
+ 不显示数字
+
+
+
+ 自定义内容
+
+
+
+
+
+
+ 进度完成
+
+
+
+ 进度状态发生错误
+
+
+
+ 进度被中断
+
+
+
+
+
+ 小尺寸
+
+
+
+ 默认尺寸
+
+
+
+ 大尺寸
+
+
+
+
+
+ @Code.Create(@"
+```html
+默认样式
+
+
+不显示数字
+
+
+自定义内容
+
+
+进度完成
+
+
+进度状态发生错误
+
+
+进度被中断
+
+
+小尺寸
+
+
+默认尺寸
+
+
+大尺寸
+
+
+```
+")
+
+
\ No newline at end of file
diff --git a/src/TDesignBlazor.Test/Components/ProgressTest.cs b/src/TDesignBlazor.Test/Components/ProgressTest.cs
new file mode 100644
index 00000000..86cc852d
--- /dev/null
+++ b/src/TDesignBlazor.Test/Components/ProgressTest.cs
@@ -0,0 +1,98 @@
+using ComponentBuilder;
+
+namespace TDesignBlazor.Test.Components;
+public class ProgressTest : TestBase