Skip to content

Commit db1ce31

Browse files
committed
refactor: 精简代码减少依赖项
1 parent 58d7324 commit db1ce31

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/BootstrapBlazor/Components/FlipClock/FlipClock.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(JSObjectReference = true)]
3+
@attribute [BootstrapModuleAutoLoader(JSObjectReference = true, AutoInvokeDispose = false)]
44

55
<div @attributes="@AdditionalAttributes" class="@ClassString" style="@StyleString" id="@Id">
66
@if (ShowYear)

src/BootstrapBlazor/Components/FlipClock/FlipClock.razor.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import Data from "../../modules/data.js"
2-
3-
export function init(id, options) {
1+
export function init(id, options) {
42
options = {
53
...{
64
viewMode: 'DateTime',
@@ -107,14 +105,6 @@ export function init(id, options) {
107105
}
108106

109107
requestAnimationFrame(flip);
110-
Data.set(id, { el, options });
111-
}
112-
113-
export function dispose(id) {
114-
const clock = Data.get(id)
115-
if (clock) {
116-
117-
}
118108
}
119109

120110
const setFlip = (flip, index, countDown) => {

0 commit comments

Comments
 (0)