feat: 更新组件变量为 IsShow
This commit is contained in:
parent
d716b340e6
commit
374392afb3
|
@ -1,4 +1,4 @@
|
|||
<Block Condition="IsDemo">
|
||||
<Block Condition="IsShow">
|
||||
<Alert Icon="fa fa-warning" Color="@Color">
|
||||
@if (ChildContent != null)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue