修改上一步调试高亮model的bug

This commit is contained in:
cjc 2022-05-07 21:08:40 +08:00
parent 68982ebcb0
commit a297a38adc
3 changed files with 18 additions and 2376 deletions

2374
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -240,8 +240,8 @@ export class Reconcile {
return freedNodes; return freedNodes;
} }
public setPrevUpdataId(prevUpdataId: string[]) { public setPrevUpdateId(prevUpdateId: string[]) {
this.prevUpdate.push(prevUpdataId); this.prevUpdate.push(prevUpdateId);
} }
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
@ -422,11 +422,13 @@ export class Reconcile {
...leakModels, ...leakModels,
]; ];
let UpdataModelsId: string [] =[]; let UpdateModelsId: string [] =[];
for (let model of updateModels) { for (let model of updateModels) {
UpdataModelsId.push(model.id); UpdateModelsId.push(model.id);
} }
this.prevUpdate?.push(UpdataModelsId); this.prevUpdate?.push(UpdateModelsId);
console.log(this.prevUpdate);
const freedModels: SVNode[] = this.getFreedModels(prevModelList, modelList); const freedModels: SVNode[] = this.getFreedModels(prevModelList, modelList);

View File

@ -168,8 +168,8 @@ export class ViewContainer {
}); });
} }
private setPrevUpdateId(prevUpdataId: string[]) { private setPrevUpdateId(prevUpdateId: string[]) {
this.reconcile.setPrevUpdataId(prevUpdataId) this.reconcile.setPrevUpdateId(prevUpdateId)
} }
/** /**
@ -186,8 +186,8 @@ export class ViewContainer {
this.restoreHighlight([...modelList, ...this.accumulateLeakModels]); this.restoreHighlight([...modelList, ...this.accumulateLeakModels]);
// 如果数据没变的话,直接退出 // 如果数据没变的话并且不是上一步调试时,直接退出因为上一步调试可能虽然数据没变但是高亮的model需要和原本的顺序执行时一致
if (isSameSources) { if (isSameSources && !handleUpdate?.hasTriggerLastStep) {
this.setPrevUpdateId([]) this.setPrevUpdateId([])
return; return;
} }