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() { remove() {
// this.project.removeDocument(this); this.project.removeDocument(this);
// todo: ... // todo: ...
} }

View File

@ -69,6 +69,14 @@ export class Project {
this.documents.forEach((doc) => doc.remove()); this.documents.forEach((doc) => doc.remove());
} }
removeDocument(doc: DocumentModel) {
const index = this.documents.indexOf(doc);
if (index < 0) {
return;
}
this.documents.splice(index, 1);
}
/** /**
* 分字段设置储存数据,不记录操作记录 * 分字段设置储存数据,不记录操作记录
*/ */