Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/BootstrapBlazor/Components/Layout/Layout.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,8 @@ protected override async Task OnInitializedAsync()
// wasm 模式下 开启权限必须提供 AdditionalAssemblies 参数
AdditionalAssemblies ??= [Assembly.GetEntryAssembly()!];

var url = Navigation.ToBaseRelativePath(Navigation.Uri);
var context = RouteTableFactory.Create(AdditionalAssemblies, url);
var uri= Navigation.ToAbsoluteUri(Navigation.Uri);
var context = RouteTableFactory.Create(AdditionalAssemblies, uri.LocalPath);
if (context.Handler != null)
{
IsAuthenticated = await context.Handler.IsAuthorizedAsync(ServiceProvider, AuthenticationStateTask, Resource);
Expand Down
4 changes: 3 additions & 1 deletion src/BootstrapBlazor/Components/Tab/Tab.razor.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ const active = tab => {
resize(tab)

const activeTab = tab.tabNav.querySelector('.tabs-item-wrap.active')
if (activeTab === null) {
return
}
if (activeTab) {
if (tab.vertical) {
const top = getPosition(activeTab).top - getPosition(activeTab.parentNode).top + activeTab.offsetHeight
Expand All @@ -69,7 +72,6 @@ const active = tab => {
}
}
else {
// mark sure display total active tabitem
const right = getPosition(activeTab).left - getPosition(activeTab.parentNode).left + activeTab.offsetWidth
const navWidth = tab.scroll.offsetWidth
const marginX = navWidth - right + 2
Expand Down