2020-05-19 20:08:49 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
2020-05-29 00:33:49 +08:00
|
|
|
|
namespace AntDesign
|
2020-05-19 20:08:49 +08:00
|
|
|
|
{
|
2021-03-12 17:02:11 +08:00
|
|
|
|
public partial class MessageItem : AntDomComponentBase
|
2020-05-19 20:08:49 +08:00
|
|
|
|
{
|
|
|
|
|
[Parameter]
|
|
|
|
|
public MessageConfig Config { get; set; }
|
|
|
|
|
|
2021-03-12 17:02:11 +08:00
|
|
|
|
protected const string PrefixCls = "ant-message";
|
2020-05-19 20:08:49 +08:00
|
|
|
|
|
|
|
|
|
private CultureInfo _cultureInfo = new CultureInfo("en-us", false);
|
|
|
|
|
|
|
|
|
|
private string GetClassName()
|
|
|
|
|
{
|
|
|
|
|
var className = $"{PrefixCls}-{Config.Type.ToString().ToLower(_cultureInfo)}";
|
|
|
|
|
|
2021-03-12 17:02:11 +08:00
|
|
|
|
if (RTL)
|
2020-05-19 20:08:49 +08:00
|
|
|
|
{
|
|
|
|
|
className += " ant-message-rtl";
|
|
|
|
|
}
|
|
|
|
|
return className;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|