mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-06 12:50:16 +01:00
This commit is contained in:
parent
f45d2bd37b
commit
fb007a61c0
16 changed files with 131 additions and 63 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue