mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-03 11:47:48 +08:00
fix(hooks): [use-lockscreen] prevent flaky unit tests (#11404)
This commit is contained in:
parent
a2de1b9c1f
commit
1e3fdde6d8
@ -40,8 +40,8 @@ export const useLockscreen = (trigger: Ref<boolean>) => {
|
||||
|
||||
const cleanup = () => {
|
||||
setTimeout(() => {
|
||||
removeClass(document.body, hiddenCls.value)
|
||||
if (withoutHiddenClass) {
|
||||
removeClass(document?.body, hiddenCls.value)
|
||||
if (withoutHiddenClass && document) {
|
||||
document.body.style.width = bodyWidth
|
||||
}
|
||||
}, 200)
|
||||
|
Loading…
Reference in New Issue
Block a user