using System; using System.Collections.Generic; using System.Text; using Microsoft.AspNetCore.Components; using OneOf; namespace AntDesign { public abstract class StatisticComponentBase : AntDomComponentBase { /// /// 设置数值的前缀 /// [Parameter] public string Prefix { get; set; } [Parameter] public RenderFragment PrefixTemplate { get; set; } /// /// 设置数值的后缀 /// [Parameter] public string Suffix { get; set; } [Parameter] public RenderFragment SuffixTemplate { get; set; } /// /// 数值的标题 /// [Parameter] public string Title { get; set; } [Parameter] public RenderFragment TitleTemplate { get; set; } /// /// 数值内容 /// [Parameter] public T Value { get; set; } /// /// 设置数值的样式 /// [Parameter] public string ValueStyle { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } private void SetClassMap() { string prefixName = "ant-statistic"; ClassMapper.Clear().Add(prefixName); } protected override void OnInitialized() { base.OnInitialized(); SetClassMap(); } } }