Blazor UI:全局功能
GlobalFeatureManager 允许您在 Blazor 应用程序中检查全局功能。
使用方法
@using Volo.Abp.GlobalFeatures
@* ... *@
@* 可以通过功能名称检查全局功能 *@
@if(GlobalFeatureManager.Instance.IsEnabled("Ecommerce.Subscription"))
{
<span>电子商务订阅功能已启用。</span>
}
@* 或者可以通过类型进行检查 *@
@if(GlobalFeatureManager.Instance.IsEnabled<EcommerceSubscriptionGlobalFeature>())
{
<span>电子商务订阅功能已启用。</span>
}
- 您可以参考 全局功能文档 中的 检查全局功能 部分,在 C# 代码中检查全局功能。
抠丁客


