Skip to content

Commit 4ec1efb

Browse files
committed
refactor: 精简 Route 页面
1 parent 51f951b commit 4ec1efb

1 file changed

Lines changed: 6 additions & 26 deletions

File tree

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
1-
@if (IsNet10OrGreater)
2-
{
3-
<Router AppAssembly="@typeof(Program).Assembly" NotFoundPage="typeof(Pages.NotFound)">
4-
<Found Context="routeData">
5-
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
6-
<FocusOnNavigate RouteData="routeData" Selector="h3" />
7-
</Found>
8-
</Router>
9-
}
10-
else
11-
{
12-
<Router AppAssembly="@typeof(Program).Assembly">
13-
<Found Context="routeData">
14-
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
15-
<FocusOnNavigate RouteData="routeData" Selector="h3" />
16-
</Found>
17-
</Router>
18-
}
19-
20-
@code {
21-
#if NET10_0_OR_GREATER
22-
private bool IsNet10OrGreater => true;
23-
#else
24-
private bool IsNet10OrGreater => false;
25-
#endif
26-
}
1+
<Router AppAssembly="@typeof(Program).Assembly" NotFoundPage="typeof(Pages.NotFound)">
2+
<Found Context="routeData">
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4+
<FocusOnNavigate RouteData="routeData" Selector="h3" />
5+
</Found>
6+
</Router>

0 commit comments

Comments
 (0)