修复刚开始调试时结点变色的bug
This commit is contained in:
@@ -422,13 +422,13 @@ export class Reconcile {
|
||||
* @param diffResult
|
||||
* @param isFirstRender
|
||||
*/
|
||||
public patch(diffResult: DiffResult,isEnterFunction: boolean) {
|
||||
public patch(diffResult: DiffResult,handleUpdata: any) {
|
||||
const { APPEND, REMOVE, FREED, LEAKED, UPDATE, CONTINUOUS, ACCUMULATE_LEAK } = diffResult;
|
||||
|
||||
this.handleAccumulateLeakModels(ACCUMULATE_LEAK);
|
||||
|
||||
// 第一次渲染的时候不高亮变化的元素
|
||||
if (this.isFirstPatch === false && !isEnterFunction) {
|
||||
// 第一次渲染和进入函数的时候不高亮变化的元素
|
||||
if (this.isFirstPatch === false && !handleUpdata.isEnterFunction && !handleUpdata.isFirstDebug) {
|
||||
this.handleChangeModels(UPDATE);
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ export class ViewContainer {
|
||||
* @param models
|
||||
* @param layoutFn
|
||||
*/
|
||||
render(layoutGroupTable: LayoutGroupTable, isSameSources: boolean, isEnterFunction: boolean) {
|
||||
render(layoutGroupTable: LayoutGroupTable, isSameSources: boolean, handleUpdata: any) {
|
||||
const modelList = Util.convertGroupTable2ModelList(layoutGroupTable);
|
||||
|
||||
// 如果数据没变的话
|
||||
@@ -154,7 +154,7 @@ export class ViewContainer {
|
||||
this.prevModelList,
|
||||
modelList,
|
||||
this.accumulateLeakModels,
|
||||
isEnterFunction
|
||||
handleUpdata.isEnterFunction
|
||||
),
|
||||
renderModelList = [...modelList, ...diffResult.REMOVE, ...diffResult.LEAKED, ...diffResult.ACCUMULATE_LEAK];
|
||||
|
||||
@@ -182,7 +182,7 @@ export class ViewContainer {
|
||||
|
||||
this.beforeRender();
|
||||
this.renderer.render(renderModelList); // 渲染视图
|
||||
this.reconcile.patch(diffResult,isEnterFunction); // 对视图上的某些变化进行对应的动作,比如:节点创建动画,节点消失动画等
|
||||
this.reconcile.patch(diffResult,handleUpdata); // 对视图上的某些变化进行对应的动作,比如:节点创建动画,节点消失动画等
|
||||
this.afterRender();
|
||||
|
||||
this.layoutGroupTable = layoutGroupTable;
|
||||
|
||||
Reference in New Issue
Block a user