Merge branch 'release/0.9.12' into fix/lihao-bugs-200824

This commit is contained in:
力皓 2020-08-24 17:09:35 +08:00
commit fe0fa8ea0b
2 changed files with 9 additions and 1 deletions

View File

@ -461,7 +461,7 @@ export class DocumentModel {
*
*/
remove() {
// this.project.removeDocument(this);
this.project.removeDocument(this);
// todo: ...
}

View File

@ -69,6 +69,14 @@ export class Project {
this.documents.forEach((doc) => doc.remove());
}
removeDocument(doc: DocumentModel) {
const index = this.documents.indexOf(doc);
if (index < 0) {
return;
}
this.documents.splice(index, 1);
}
/**
*
*/