This commit is contained in:
Vanessa 2023-05-10 00:01:47 +08:00
parent f45d2bd37b
commit fb007a61c0
16 changed files with 131 additions and 63 deletions

View file

@ -5,21 +5,23 @@ import {Model} from "../Model";
export class Custom extends Model {
private element: Element;
public data: any;
public type: string;
public init: () => void;
public destroy: () => void;
public resize: () => void;
public update: () => void;
constructor(options: {
type: string,
tab: Tab,
data: any,
destroy?: () => void,
resize?: () => void,
update?: () => void,
type: string, // 同一类型的唯一标识
init: () => void
}) {
super({id: options.tab.id});
this.type = options.type;
if (window.siyuan.config.fileTree.openFilesUseCurrentTab) {
options.tab.headElement.classList.add("item--unupdate");
}