mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-21 08:28:16 +00:00
Merge commit 'f77b1dc0fadab6605fb10303f696c879c28b4378' into def_releases_2022022114463131_ali-lowcode_ali-lowcode-engine/1.0.78
This commit is contained in:
commit
59d5d7c241
@ -86,7 +86,7 @@ export class DocumentModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get fileName(): string {
|
get fileName(): string {
|
||||||
return this.rootNode?.getExtraProp('fileName')?.getAsString() || this.id;
|
return this.rootNode?.getExtraProp('fileName', false)?.getAsString() || this.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
set fileName(fileName: string) {
|
set fileName(fileName: string) {
|
||||||
|
|||||||
@ -43,21 +43,20 @@ export class History {
|
|||||||
if (this.asleep) return;
|
if (this.asleep) return;
|
||||||
untracked(() => {
|
untracked(() => {
|
||||||
const log = currentSerialization.serialize(data);
|
const log = currentSerialization.serialize(data);
|
||||||
if (this.session.isActive()) {
|
if (this.session.isActive()) {
|
||||||
this.session.log(log);
|
this.session.log(log);
|
||||||
} else {
|
} else {
|
||||||
this.session.end();
|
this.session.end();
|
||||||
const lastState = this.getState();
|
const lastState = this.getState();
|
||||||
const cursor = this.session.cursor + 1;
|
const cursor = this.session.cursor + 1;
|
||||||
const session = new Session(cursor, log, this.timeGap);
|
const session = new Session(cursor, log, this.timeGap);
|
||||||
this.session = session;
|
this.session = session;
|
||||||
this.records.splice(cursor, this.records.length - cursor, session);
|
this.records.splice(cursor, this.records.length - cursor, session);
|
||||||
const currentState = this.getState();
|
const currentState = this.getState();
|
||||||
if (currentState !== lastState) {
|
if (currentState !== lastState) {
|
||||||
this.emitter.emit('statechange', currentState);
|
this.emitter.emit('statechange', currentState);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
});
|
});
|
||||||
}, { fireImmediately: true });
|
}, { fireImmediately: true });
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user