修改上一步调试高亮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;
}
public setPrevUpdataId(prevUpdataId: string[]) {
this.prevUpdate.push(prevUpdataId);
public setPrevUpdateId(prevUpdateId: string[]) {
this.prevUpdate.push(prevUpdateId);
}
// ------------------------------------------------------------------------------------------------
@ -422,11 +422,13 @@ export class Reconcile {
...leakModels,
];
let UpdataModelsId: string [] =[];
let UpdateModelsId: string [] =[];
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);

View File

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