mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-19 13:38:06 +01:00
feat: Add Tag context to the method in plugin addTab (#8336)
This commit is contained in:
parent
07b0ccbabe
commit
73946e1b18
1 changed files with 4 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import {App} from "../../index";
|
|||
|
||||
export class Custom extends Model {
|
||||
public element: Element;
|
||||
public tab: Tab;
|
||||
public data: any;
|
||||
public type: string;
|
||||
public init: () => void;
|
||||
|
|
@ -22,12 +23,14 @@ export class Custom extends Model {
|
|||
init: () => void
|
||||
}) {
|
||||
super({app: options.app, id: options.tab.id});
|
||||
this.type = options.type;
|
||||
if (window.siyuan.config.fileTree.openFilesUseCurrentTab) {
|
||||
options.tab.headElement.classList.add("item--unupdate");
|
||||
}
|
||||
|
||||
this.element = options.tab.panelElement;
|
||||
this.tab = options.tab;
|
||||
this.data = options.data;
|
||||
this.type = options.type;
|
||||
this.init = options.init;
|
||||
this.destroy = options.destroy;
|
||||
this.resize = options.resize;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue