From b414983dd54046bbe5119553bb458ab3f100afab Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 8 Apr 2025 12:01:42 +0800 Subject: [PATCH 1/3] refactor: remove comment --- src/BootstrapBlazor/Components/Tab/Tab.razor.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/BootstrapBlazor/Components/Tab/Tab.razor.js b/src/BootstrapBlazor/Components/Tab/Tab.razor.js index 346f939abb2..f4d3209883d 100644 --- a/src/BootstrapBlazor/Components/Tab/Tab.razor.js +++ b/src/BootstrapBlazor/Components/Tab/Tab.razor.js @@ -69,7 +69,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 From e302db39721a897b167a1d9326b805c9614f927b Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 8 Apr 2025 12:10:06 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=E6=BF=80?= =?UTF-8?q?=E6=B4=BB=E6=A0=87=E7=AD=BE=E9=A1=B5=E7=A9=BA=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Components/Tab/Tab.razor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/BootstrapBlazor/Components/Tab/Tab.razor.js b/src/BootstrapBlazor/Components/Tab/Tab.razor.js index f4d3209883d..f3babf65e5e 100644 --- a/src/BootstrapBlazor/Components/Tab/Tab.razor.js +++ b/src/BootstrapBlazor/Components/Tab/Tab.razor.js @@ -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 From 534c3d60f97fb6a4d8228f97744ef85d5056928c Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Tue, 8 Apr 2025 12:31:16 +0800 Subject: [PATCH 3/3] =?UTF-8?q?refactor:=20=E4=BD=BF=E7=94=A8=20ToAbsolute?= =?UTF-8?q?Uri=20=E9=98=B2=E6=AD=A2=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Components/Layout/Layout.razor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor/Components/Layout/Layout.razor.cs b/src/BootstrapBlazor/Components/Layout/Layout.razor.cs index c268d624814..170faf5e008 100644 --- a/src/BootstrapBlazor/Components/Layout/Layout.razor.cs +++ b/src/BootstrapBlazor/Components/Layout/Layout.razor.cs @@ -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);