This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

layer增加关闭架设 layer增加关闭回调

old
宇天 2019-11-06 09:26:26 +08:00
parent 780b985041
commit b88aa8fa7c
1 changed files with 3 additions and 0 deletions

View File

@ -420,13 +420,16 @@ class Layer {
this.root.children[1].style.cssText += _style
this.timer = setTimeout(() => {
this.parentNode.removeChild(this)
this.dispatchEvent(new CustomEvent('close'))
}, 200)
} else {
clearTimeout(this.timer)
this.parentNode.removeChild(this)
this.dispatchEvent(new CustomEvent('close'))
}
} else {
this.removeAttribute('common')
this.dispatchEvent(new CustomEvent('close'))
}
}