mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-27 01:14:07 +01:00
♻️ https://github.com/siyuan-note/siyuan/issues/5066 click block menu
This commit is contained in:
parent
61ab0ffd68
commit
54022ed92a
70 changed files with 604 additions and 350 deletions
|
|
@ -10,6 +10,7 @@ import {getDockByType, setPanelFocus} from "../layout/util";
|
|||
import {hasClosestByAttribute} from "../protyle/util/hasClosest";
|
||||
|
||||
export class Plugin {
|
||||
private app: App;
|
||||
public i18n: IObject;
|
||||
public eventBus: EventBus;
|
||||
public data: any = {};
|
||||
|
|
@ -34,6 +35,7 @@ export class Plugin {
|
|||
name: string,
|
||||
i18n: IObject
|
||||
}) {
|
||||
this.app = options.app;
|
||||
this.i18n = options.i18n;
|
||||
this.name = options.name;
|
||||
this.eventBus = new EventBus(options.name);
|
||||
|
|
@ -141,6 +143,7 @@ export class Plugin {
|
|||
const type2 = this.name + options.type;
|
||||
this.models[type2] = (arg: { data: any, tab: Tab }) => {
|
||||
const customObj = new Custom({
|
||||
app: this.app,
|
||||
tab: arg.tab,
|
||||
type: type2,
|
||||
data: arg.data,
|
||||
|
|
@ -173,6 +176,7 @@ export class Plugin {
|
|||
config: options.config,
|
||||
model: (arg: { tab: Tab }) => {
|
||||
const customObj = new Custom({
|
||||
app: this.app,
|
||||
tab: arg.tab,
|
||||
type: type2,
|
||||
data: options.data,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue