NullCssClass Attribute

当参数是 null 时应用指定的 CSS 字符串

[Parameter][NullCssClass("invalid")]public string? Text { get; set; }
<Component />
<div class="invalid"></div>

<Component Text="Hello" />
<div></div>

Last updated