layer增加关闭架设 layer增加关闭回调
parent
780b985041
commit
b88aa8fa7c
|
@ -420,13 +420,16 @@ class Layer {
|
||||||
this.root.children[1].style.cssText += _style
|
this.root.children[1].style.cssText += _style
|
||||||
this.timer = setTimeout(() => {
|
this.timer = setTimeout(() => {
|
||||||
this.parentNode.removeChild(this)
|
this.parentNode.removeChild(this)
|
||||||
|
this.dispatchEvent(new CustomEvent('close'))
|
||||||
}, 200)
|
}, 200)
|
||||||
} else {
|
} else {
|
||||||
clearTimeout(this.timer)
|
clearTimeout(this.timer)
|
||||||
this.parentNode.removeChild(this)
|
this.parentNode.removeChild(this)
|
||||||
|
this.dispatchEvent(new CustomEvent('close'))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.removeAttribute('common')
|
this.removeAttribute('common')
|
||||||
|
this.dispatchEvent(new CustomEvent('close'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue