Skip to content

Commit

Permalink
get reusetabs title from menu (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderJames authored Aug 21, 2024
1 parent 7976033 commit 37f9fce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
"type": "computed",
"value": "(host != 'webapp')"
},
"IsNotFull":{
"type": "computed",
"value": "(!full)"
},
"skipRestore": {
"type": "parameter",
"datatype": "bool",
Expand Down
7 changes: 3 additions & 4 deletions src/AntDesign.Pro/Layouts/BasicLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
protected override async Task OnInitializedAsync()
{
//#if (!full)
#if IsNotFull
_menuData = new[]{
new MenuDataItem
{
Expand All @@ -66,12 +66,11 @@
Icon = "smile",
}
};
//#else
#else
_localizationChanged = (sender, args) => InvokeAsync(StateHasChanged);
LocalizationService.LanguageChanged += _localizationChanged;
_menuData = await HttpClient.GetFromJsonAsync<MenuDataItem[]>("data/menu.json");
//#endif
#endif
}

public LinkItem[] Links { get; set; } =
Expand Down
2 changes: 1 addition & 1 deletion src/AntDesign.Pro/Pages/Dashboard/Analysis/Index.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@namespace AntDesign.Pro.Template.Pages.Dashboard.Analysis
@page "/"
@attribute [ReuseTabsPage(Title ="Home", Pin =true, Closable =false, Order =0)]
@attribute [ReuseTabsPage(Pin = true, Closable = false, Order =0)]

<GridContent>
<Row Type="flex" Gutter="24">
Expand Down

0 comments on commit 37f9fce

Please sign in to comment.