Skip to content

Commit

Permalink
loading: 1.修复loading状态更新过快的情况下,loading的dom没有发生变化. (#15123)
Browse files Browse the repository at this point in the history
* loading 修复loading状态更新过快的情况下,loading的dom没有发生变化

* revert example/play/index.vue
  • Loading branch information
FAKER-A authored and luckyCao committed May 23, 2019
1 parent c27788f commit 2f94c02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/loading/src/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ loadingDirective.install = Vue => {
});
} else {
afterLeave(el.instance, _ => {
if (!el.instance.hiding) return;
el.domVisible = false;
const target = binding.modifiers.fullscreen || binding.modifiers.body
? document.body
Expand Down Expand Up @@ -80,6 +81,9 @@ loadingDirective.install = Vue => {
}
});
el.domInserted = true;
} else if (el.domVisible && el.instance.hiding === true) {
el.instance.visible = true;
el.instance.hiding = false;
}
};

Expand Down

0 comments on commit 2f94c02

Please sign in to comment.