Skip to content

Commit 0ab572a

Browse files
committed
refactor: 移除 init 调用
1 parent 81bd927 commit 0ab572a

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/BootstrapBlazor/Components/Scroll/Scroll.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@namespace BootstrapBlazor.Components
22
@inherits BootstrapModuleComponentBase
3-
@attribute [BootstrapModuleAutoLoader(AutoInvokeDispose = false)]
3+
@attribute [BootstrapModuleAutoLoader(AutoInvokeInit = false, AutoInvokeDispose = false)]
44

55
<div @attributes="AdditionalAttributes" id="@Id" class="@ClassString" style="@StyleString">
66
@ChildContent

src/BootstrapBlazor/Components/Scroll/Scroll.razor.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
export function init(id) {
2-
const el = document.getElementById(id)
3-
if (el === null) {
4-
5-
}
6-
}
7-
8-
export function scrollToBottom(id) {
1+
export function scrollToBottom(id) {
92
const el = document.getElementById(id);
103
const top = el.scrollHeight;
114
el.scrollTo({

0 commit comments

Comments
 (0)