Skip to content

Commit 63d52f8

Browse files
committed
refactor: 精简代码
1 parent 59d95eb commit 63d52f8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/BootstrapBlazor/Components/DropdownWidget/DropdownWidget.razor.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import Data from "../../modules/data.js"
2-
import EventHandler from "../../modules/event-handler.js"
1+
import EventHandler from "../../modules/event-handler.js"
32

43
export function init(id, invoke, options) {
54
const el = document.getElementById(id);
@@ -15,13 +14,10 @@ export function init(id, invoke, options) {
1514
}
1615

1716
const { method } = options;
18-
EventHandler.on(el, 'hidden.bs.dropdown', invokeMethod);
1917
EventHandler.on(el, 'shown.bs.dropdown', invokeMethod);
18+
EventHandler.on(el, 'hidden.bs.dropdown', invokeMethod);
2019
}
2120

2221
export function dispose(id) {
23-
const dw = Data.get(id)
24-
Data.remove(id);
25-
2622
EventHandler.off(el, 'hidden.bs.dropdown');
2723
}

0 commit comments

Comments
 (0)