From 3477b6d1382dff0e75ba24d8b0dee0efd60ee84c Mon Sep 17 00:00:00 2001 From: lisheng Date: Thu, 23 May 2019 10:21:30 +0800 Subject: [PATCH] =?UTF-8?q?loading:=201.=E4=BF=AE=E5=A4=8Dloading=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=9B=B4=E6=96=B0=E8=BF=87=E5=BF=AB=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=EF=BC=8Cloading=E7=9A=84dom=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=8F=91=E7=94=9F=E5=8F=98=E5=8C=96.=20(#15123)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * loading 修复loading状态更新过快的情况下,loading的dom没有发生变化 * revert example/play/index.vue --- packages/loading/src/directive.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/loading/src/directive.js b/packages/loading/src/directive.js index ca7093c0635..f4400feb65c 100644 --- a/packages/loading/src/directive.js +++ b/packages/loading/src/directive.js @@ -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 @@ -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; } };