Vanessa 2022-08-07 00:14:50 +08:00
parent d93023fc8a
commit 72fba69115
8 changed files with 78 additions and 6 deletions

View file

@ -26,6 +26,7 @@ import {getAllModels} from "./getAll";
import {fetchPost} from "../util/fetch";
import {onGet} from "../protyle/util/onGet";
import {countBlockWord} from "./status";
import {saveScroll} from "../protyle/scroll/saveScroll";
export class Wnd {
public id: string;
@ -488,6 +489,9 @@ export class Wnd {
private removeTabAction = (id: string, closeAll = false) => {
this.children.find((item, index) => {
if (item.id === id) {
if (item.model instanceof Editor) {
saveScroll(item.model.editor.protyle);
}
if (this.children.length === 1) {
this.destroyModel(this.children[0].model);
this.children = [];