feat: 增加 AdminAlert 组件
This commit is contained in:
parent
9912d73e70
commit
578bfc6710
|
@ -0,0 +1,3 @@
|
|||
<Block Condition="IsDemo">
|
||||
<Alert Icon="fa fa-warning" Color="Color.Info">@Text</Alert>
|
||||
</Block>
|
|
@ -0,0 +1,25 @@
|
|||
using BootstrapAdmin.Web.Core;
|
||||
|
||||
namespace BootstrapAdmin.Web.Components;
|
||||
|
||||
public partial class AdminAlert
|
||||
{
|
||||
[Parameter]
|
||||
public string? Text { get; set; }
|
||||
|
||||
private bool IsDemo { get; set; }
|
||||
|
||||
[Inject]
|
||||
[NotNull]
|
||||
private IDict? DictService { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
|
||||
IsDemo = DictService.IsDemo();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue