mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-15 02:38:16 +00:00
fix: 实现 removeDocument
This commit is contained in:
parent
9ca00c5ba6
commit
c07b447fb5
@ -461,7 +461,7 @@ export class DocumentModel {
|
|||||||
* 从项目中移除
|
* 从项目中移除
|
||||||
*/
|
*/
|
||||||
remove() {
|
remove() {
|
||||||
// this.project.removeDocument(this);
|
this.project.removeDocument(this);
|
||||||
// todo: ...
|
// todo: ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分字段设置储存数据,不记录操作记录
|
* 分字段设置储存数据,不记录操作记录
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user