进度条 (Progress)

支持不同样式。

概述

  • 支持默认、主要、成功、信息、警告、危险样式

代码演示

1.默认示例

50%
35%
100%
60%
55%
80%
namespace WebSite.Docus.Feedback.Progress;

class Progress1 : BaseComponent
{
    protected override void BuildRenderTree(RenderTreeBuilder builder)
    {
        builder.Progress(StyleType.Default, 0.5M);
        builder.Progress(StyleType.Primary, 0.35M);
        builder.Progress(StyleType.Success, 1);
        builder.Progress(StyleType.Info, 0.6M);
        builder.Progress(StyleType.Warning, 0.55M);
        builder.Progress(StyleType.Danger, 0.8M);
    }
}

2.固定宽度示例

35%
60%
namespace WebSite.Docus.Feedback.Progress;

class Progress2 : BaseComponent
{
    protected override void BuildRenderTree(RenderTreeBuilder builder)
    {
        builder.Progress(StyleType.Primary, 0.35M, 100);
        builder.Progress(StyleType.Success, 0.6M, 200);
    }
}