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">
|
<Alert Icon="fa fa-warning" Color="@Color">
|
||||||
@if (ChildContent != null)
|
@if (ChildContent != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,19 +13,6 @@ public partial class AdminAlert
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public Color Color { get; set; } = Color.Danger;
|
public Color Color { get; set; } = Color.Danger;
|
||||||
|
|
||||||
private bool IsDemo { get; set; }
|
[Parameter]
|
||||||
|
public bool IsShow { get; set; } = true;
|
||||||
[Inject]
|
|
||||||
[NotNull]
|
|
||||||
private IDict? DictService { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
protected override void OnInitialized()
|
|
||||||
{
|
|
||||||
base.OnInitialized();
|
|
||||||
|
|
||||||
IsDemo = DictService.IsDemo();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue