feat: 更新

main
bicijinlian 1 year ago
parent 182bc77e9c
commit 8e2475d309

@ -1,4 +1,4 @@
<Router AppAssembly="@typeof(BlazorSharedDemo.ServerApp.App).Assembly"> <Router AppAssembly="@typeof(BlazorSharedDemo.ServerApp.App).Assembly" AdditionalAssemblies="new[] { typeof(BlazorSharedDemo.SharedUI.AppGlobal).Assembly }">
<Found Context="routeData"> <Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" /> <FocusOnNavigate RouteData="@routeData" Selector="h1" />
@ -10,6 +10,3 @@
</LayoutView> </LayoutView>
</NotFound> </NotFound>
</Router> </Router>
@{
}

@ -1,4 +1,4 @@
@*如果组件的路由与共享Razor类库中组件的路由相同则会覆盖(替换)共享类库的路由*@ @*应用路由不能与共享Razor类库的路由重复,即所有类库中的路由不能重复*@
@page "/" @page "/app-index"
<h1>ServerApp Hello!</h1> <h1>ServerApp Hello!</h1>

@ -1,4 +1,4 @@
<Router AppAssembly="@typeof(App).Assembly" AdditionalAssemblies="new[] { typeof(BlazorSharedDemo.SharedUI.MainLayout).Assembly }"> <Router AppAssembly="@typeof(App).Assembly" AdditionalAssemblies="new[] { typeof(BlazorSharedDemo.SharedUI.AppGlobal).Assembly }">
<Found Context="routeData"> <Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" /> <FocusOnNavigate RouteData="@routeData" Selector="h1" />

@ -1,4 +1,4 @@
@*路由不能与共享Razor类库的路由重复*@ @*应用路由不能与共享Razor类库的路由重复,即所有类库中的路由不能重复*@
@page "/app-index" @page "/app-index"
<h1>Wasl Hello</h1> <h1>Wasl Hello</h1>

Loading…
Cancel
Save