feat: 更新组件变量为 IsShow

This commit is contained in:
Argo-Tianyi 2021-12-25 18:55:42 +08:00
parent d716b340e6
commit 374392afb3
2 changed files with 3 additions and 16 deletions

View File

@ -1,4 +1,4 @@
<Block Condition="IsDemo">
<Block Condition="IsShow">
<Alert Icon="fa fa-warning" Color="@Color">
@if (ChildContent != null)
{

View File

@ -13,19 +13,6 @@ public partial class AdminAlert
[Parameter]
public Color Color { get; set; } = Color.Danger;
private bool IsDemo { get; set; }
[Inject]
[NotNull]
private IDict? DictService { get; set; }
/// <summary>
///
/// </summary>
protected override void OnInitialized()
{
base.OnInitialized();
IsDemo = DictService.IsDemo();
}
[Parameter]
public bool IsShow { get; set; } = true;
}