From 623c6fabbc41872a6831431330fbf69d1d6a2ec3 Mon Sep 17 00:00:00 2001 From: cjc <431909623@qq.com> Date: Mon, 7 Mar 2022 22:05:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9isEnterfuntion=E4=B8=BAtrue?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E6=94=B9=E5=8F=98=E5=8F=91=E7=94=9F=E5=8F=98?= =?UTF-8?q?=E5=8C=96=E7=9A=84model=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/View/reconcile.ts | 4 ++-- src/View/viewContainer.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/View/reconcile.ts b/src/View/reconcile.ts index 1d6fb41..8b2e0c6 100644 --- a/src/View/reconcile.ts +++ b/src/View/reconcile.ts @@ -422,13 +422,13 @@ export class Reconcile { * @param diffResult * @param isFirstRender */ - public patch(diffResult: DiffResult) { + public patch(diffResult: DiffResult,isEnterFunction: boolean) { const { APPEND, REMOVE, FREED, LEAKED, UPDATE, CONTINUOUS, ACCUMULATE_LEAK } = diffResult; this.handleAccumulateLeakModels(ACCUMULATE_LEAK); // 第一次渲染的时候不高亮变化的元素 - if (this.isFirstPatch === false) { + if (this.isFirstPatch === false && !isEnterFunction) { this.handleChangeModels(UPDATE); } diff --git a/src/View/viewContainer.ts b/src/View/viewContainer.ts index c7a6f7b..250b9ed 100644 --- a/src/View/viewContainer.ts +++ b/src/View/viewContainer.ts @@ -182,7 +182,7 @@ export class ViewContainer { this.beforeRender(); this.renderer.render(renderModelList); // 渲染视图 - this.reconcile.patch(diffResult); // 对视图上的某些变化进行对应的动作,比如:节点创建动画,节点消失动画等 + this.reconcile.patch(diffResult,isEnterFunction); // 对视图上的某些变化进行对应的动作,比如:节点创建动画,节点消失动画等 this.afterRender(); this.layoutGroupTable = layoutGroupTable;