Skip to content

Commit 02c7ef3

Browse files
committed
refactor: 精简代码
1 parent 527aa38 commit 02c7ef3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/BootstrapBlazor/Components/Drawer/Drawer.razor.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ export function execute(id, open) {
124124
body.classList.add('overflow-hidden')
125125
requestAnimationFrame(show)
126126
}
127-
else {
128-
if (el.classList.contains('show')) {
129-
drawerBody.classList.remove('show')
130-
requestAnimationFrame(hide)
131-
}
127+
else if (el.classList.contains('show')) {
128+
drawerBody.classList.remove('show')
129+
requestAnimationFrame(hide)
132130
}
133131
}
134132

0 commit comments

Comments
 (0)