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;