修改isEnterfuntion为true时不改变发生变化的model的样式

This commit is contained in:
cjc 2022-03-07 22:05:01 +08:00
parent 391ccff882
commit 623c6fabbc
2 changed files with 3 additions and 3 deletions

View File

@ -422,13 +422,13 @@ export class Reconcile {
* @param diffResult * @param diffResult
* @param isFirstRender * @param isFirstRender
*/ */
public patch(diffResult: DiffResult) { public patch(diffResult: DiffResult,isEnterFunction: boolean) {
const { APPEND, REMOVE, FREED, LEAKED, UPDATE, CONTINUOUS, ACCUMULATE_LEAK } = diffResult; const { APPEND, REMOVE, FREED, LEAKED, UPDATE, CONTINUOUS, ACCUMULATE_LEAK } = diffResult;
this.handleAccumulateLeakModels(ACCUMULATE_LEAK); this.handleAccumulateLeakModels(ACCUMULATE_LEAK);
// 第一次渲染的时候不高亮变化的元素 // 第一次渲染的时候不高亮变化的元素
if (this.isFirstPatch === false) { if (this.isFirstPatch === false && !isEnterFunction) {
this.handleChangeModels(UPDATE); this.handleChangeModels(UPDATE);
} }

View File

@ -182,7 +182,7 @@ export class ViewContainer {
this.beforeRender(); this.beforeRender();
this.renderer.render(renderModelList); // 渲染视图 this.renderer.render(renderModelList); // 渲染视图
this.reconcile.patch(diffResult); // 对视图上的某些变化进行对应的动作,比如:节点创建动画,节点消失动画等 this.reconcile.patch(diffResult,isEnterFunction); // 对视图上的某些变化进行对应的动作,比如:节点创建动画,节点消失动画等
this.afterRender(); this.afterRender();
this.layoutGroupTable = layoutGroupTable; this.layoutGroupTable = layoutGroupTable;