Skip to content

Commit 621a090

Browse files
committed
refactor: 重构脚本
1 parent 81cd157 commit 621a090

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/BootstrapBlazor.Server/Components/Layout/ComponentLayout.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
108108
}
109109
if (Module != null)
110110
{
111-
await Module.InvokeVoidAsync("init");
111+
await Module.InvokeVoidAsync("scrollToAnchor");
112112
}
113113
}
114114

src/BootstrapBlazor.Server/Components/Layout/ComponentLayout.razor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function init() {
1+
export function scrollToAnchor() {
22
const hash = decodeURI(location.hash)
33
if (hash) {
44
const anchor = hash.split('-')[0]

0 commit comments

Comments
 (0)