loading: 1.修复loading状态更新过快的情况下,loading的dom没有发生变化. (#15123)

* loading 修复loading状态更新过快的情况下,loading的dom没有发生变化

* revert example/play/index.vue
pull/15685/head
lisheng 2019-05-23 10:21:30 +08:00 committed by luckyCao
parent c27788f993
commit 2f94c02598
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,7 @@ loadingDirective.install = Vue => {
}); });
} else { } else {
afterLeave(el.instance, _ => { afterLeave(el.instance, _ => {
if (!el.instance.hiding) return;
el.domVisible = false; el.domVisible = false;
const target = binding.modifiers.fullscreen || binding.modifiers.body const target = binding.modifiers.fullscreen || binding.modifiers.body
? document.body ? document.body
@ -80,6 +81,9 @@ loadingDirective.install = Vue => {
} }
}); });
el.domInserted = true; el.domInserted = true;
} else if (el.domVisible && el.instance.hiding === true) {
el.instance.visible = true;
el.instance.hiding = false;
} }
}; };