mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 12:48:04 +08:00
fix(components): [loading] remove el-loading-parent--relative
correctly (#9630)
* fix(components): [loading] fix el-loading-parent--relative (#9627) * chore: update Co-authored-by: holazz <2418184580@qq.com>
This commit is contained in:
parent
dee98ed32a
commit
69caee0d2a
@ -54,17 +54,10 @@ export function createLoadingComponent(options: LoadingOptionsResolved) {
|
||||
function close() {
|
||||
if (options.beforeClose && !options.beforeClose()) return
|
||||
|
||||
const target = data.parent
|
||||
target.vLoadingAddClassList = undefined
|
||||
afterLeaveFlag.value = true
|
||||
clearTimeout(afterLeaveTimer)
|
||||
|
||||
afterLeaveTimer = window.setTimeout(() => {
|
||||
if (afterLeaveFlag.value) {
|
||||
afterLeaveFlag.value = false
|
||||
destroySelf()
|
||||
}
|
||||
}, 400)
|
||||
afterLeaveTimer = window.setTimeout(handleAfterLeave, 400)
|
||||
data.visible = false
|
||||
|
||||
options.closed?.()
|
||||
@ -72,7 +65,9 @@ export function createLoadingComponent(options: LoadingOptionsResolved) {
|
||||
|
||||
function handleAfterLeave() {
|
||||
if (!afterLeaveFlag.value) return
|
||||
const target = data.parent
|
||||
afterLeaveFlag.value = false
|
||||
target.vLoadingAddClassList = undefined
|
||||
destroySelf()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user