From f98b4c68876adcee574d29cdb6e69e2ff8d6cd35 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 22 Oct 2021 20:13:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/4.widget.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index b946b3df6..c3d1e0bc5 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -152,13 +152,13 @@ pushTarget(this); var async = this.__async; this.__async = false; - if(async && this._isMounted){ - callLifeHook(this, "beforeMount"); - } - this._mount(); if (async && this._isMounted) { + callLifeHook(this, "beforeMount"); + this._mount(); callLifeHook(this, "mounted"); this.fireEvent(BI.Events.MOUNT); + } else { + this._mount(); } popTarget(); }, @@ -766,7 +766,7 @@ BI.onBeforeMount = function (beforeMount) { if (current) { - if(current.__isMounting){ + if (current.__isMounting) { beforeMount(); return; } @@ -780,7 +780,7 @@ }; BI.onMounted = function (mounted) { if (current) { - if(current._isMounted && !this.__async){ + if (current._isMounted && !this.__async) { mounted(); return; }