Browse Source
Merge pull request #23680 from abpframework/auto-merge/rel-9-3/3970
Merge branch dev with rel-9.3
issue-22408
Ma Liming
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
11 additions and
23 deletions
-
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor
-
modules/setting-management/src/Volo.Abp.SettingManagement.Blazor/Pages/SettingManagement/SettingManagement.razor.cs
|
|
@ -13,20 +13,19 @@ |
|
|
</PageHeader> |
|
|
</PageHeader> |
|
|
|
|
|
|
|
|
<Card> |
|
|
<Card> |
|
|
<CardBody Class="pt-0"> |
|
|
<CardBody Class="pt-3"> |
|
|
<Tabs @bind-SelectedTab="@SelectedGroup" TabPosition="TabPosition.Start" Pills="true" RenderMode="TabsRenderMode.LazyReload" VerticalItemsColumnSize="ColumnSize.Is3.OnDesktop.Is6.OnTablet.Is12.OnMobile"> |
|
|
@if (!string.IsNullOrEmpty(SelectedGroup)) |
|
|
<Items> |
|
|
{ |
|
|
<div class="pt-3"> |
|
|
<Tabs @bind-SelectedTab="@SelectedGroup" TabPosition="TabPosition.Start" Pills="true" RenderMode="TabsRenderMode.LazyReload" VerticalItemsColumnSize="ColumnSize.Is3.OnDesktop.Is6.OnTablet.Is12.OnMobile"> |
|
|
|
|
|
<Items> |
|
|
@foreach (var group in SettingComponentCreationContext.Groups) |
|
|
@foreach (var group in SettingComponentCreationContext.Groups) |
|
|
{ |
|
|
{ |
|
|
<Tab Name="@GetNormalizedString(group.Id)"> |
|
|
<Tab Name="@GetNormalizedString(group.Id)"> |
|
|
@group.DisplayName |
|
|
@group.DisplayName |
|
|
</Tab> |
|
|
</Tab> |
|
|
} |
|
|
} |
|
|
</div> |
|
|
</Items> |
|
|
</Items> |
|
|
<Content> |
|
|
<Content> |
|
|
|
|
|
<div class="pt-3"> |
|
|
|
|
|
@foreach (var group in SettingComponentCreationContext.Groups) |
|
|
@foreach (var group in SettingComponentCreationContext.Groups) |
|
|
{ |
|
|
{ |
|
|
<TabPanel Name="@GetNormalizedString(group.Id)" class="abp-md-form"> |
|
|
<TabPanel Name="@GetNormalizedString(group.Id)" class="abp-md-form"> |
|
|
@ -41,8 +40,8 @@ |
|
|
@SettingItemRenders.Last() |
|
|
@SettingItemRenders.Last() |
|
|
</TabPanel> |
|
|
</TabPanel> |
|
|
} |
|
|
} |
|
|
</div> |
|
|
</Content> |
|
|
</Content> |
|
|
</Tabs> |
|
|
</Tabs> |
|
|
} |
|
|
</CardBody> |
|
|
</CardBody> |
|
|
</Card> |
|
|
</Card> |
|
|
|
|
|
@ -43,23 +43,12 @@ public partial class SettingManagement |
|
|
SettingComponentCreationContext.Normalize(); |
|
|
SettingComponentCreationContext.Normalize(); |
|
|
SettingItemRenders.Clear(); |
|
|
SettingItemRenders.Clear(); |
|
|
|
|
|
|
|
|
if (SettingComponentCreationContext.Groups.Any()) |
|
|
if(SelectedGroup.IsNullOrEmpty() && SettingComponentCreationContext.Groups.Any()) |
|
|
{ |
|
|
{ |
|
|
SelectedGroup = GetNormalizedString(SettingComponentCreationContext.Groups.First().Id); |
|
|
SelectedGroup = GetNormalizedString(SettingComponentCreationContext.Groups.First().Id); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected override async Task OnAfterRenderAsync(bool firstRender) |
|
|
|
|
|
{ |
|
|
|
|
|
if (firstRender) |
|
|
|
|
|
{ |
|
|
|
|
|
await Task.Yield(); |
|
|
|
|
|
await InvokeAsync(StateHasChanged); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
await base.OnAfterRenderAsync(firstRender); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected virtual string GetNormalizedString(string value) |
|
|
protected virtual string GetNormalizedString(string value) |
|
|
{ |
|
|
{ |
|
|
return value.Replace('.', '_'); |
|
|
return value.Replace('.', '_'); |
|
|
|