fix protyle bug
This commit is contained in:
parent
8be20e023c
commit
bc635356dc
2 changed files with 21 additions and 22 deletions
|
@ -6,7 +6,7 @@
|
||||||
export let app;
|
export let app;
|
||||||
|
|
||||||
let time: string = "";
|
let time: string = "";
|
||||||
let ver: string;
|
let ver: string = "";
|
||||||
|
|
||||||
let divProtyle: HTMLDivElement;
|
let divProtyle: HTMLDivElement;
|
||||||
let protyle: any;
|
let protyle: any;
|
||||||
|
|
41
src/index.ts
41
src/index.ts
|
@ -85,27 +85,6 @@ export default class PluginSample extends Plugin {
|
||||||
element: statusIconTemp.content.firstElementChild as HTMLElement,
|
element: statusIconTemp.content.firstElementChild as HTMLElement,
|
||||||
});
|
});
|
||||||
|
|
||||||
let tabDiv = document.createElement("div");
|
|
||||||
new HelloExample({
|
|
||||||
target: tabDiv,
|
|
||||||
props: {
|
|
||||||
app: this.app,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.customTab = this.addTab({
|
|
||||||
type: TAB_TYPE,
|
|
||||||
init() {
|
|
||||||
this.element.appendChild(tabDiv);
|
|
||||||
console.log(this.element);
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
console.log("before destroy tab:", TAB_TYPE);
|
|
||||||
},
|
|
||||||
destroy() {
|
|
||||||
console.log("destroy tab:", TAB_TYPE);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.addCommand({
|
this.addCommand({
|
||||||
langKey: "showDialog",
|
langKey: "showDialog",
|
||||||
hotkey: "⇧⌘O",
|
hotkey: "⇧⌘O",
|
||||||
|
@ -244,6 +223,26 @@ export default class PluginSample extends Plugin {
|
||||||
// this.loadData(STORAGE_NAME);
|
// this.loadData(STORAGE_NAME);
|
||||||
this.settingUtils.load();
|
this.settingUtils.load();
|
||||||
console.log(`frontend: ${getFrontend()}; backend: ${getBackend()}`);
|
console.log(`frontend: ${getFrontend()}; backend: ${getBackend()}`);
|
||||||
|
let tabDiv = document.createElement("div");
|
||||||
|
new HelloExample({
|
||||||
|
target: tabDiv,
|
||||||
|
props: {
|
||||||
|
app: this.app,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.customTab = this.addTab({
|
||||||
|
type: TAB_TYPE,
|
||||||
|
init() {
|
||||||
|
this.element.appendChild(tabDiv);
|
||||||
|
console.log(this.element);
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
console.log("before destroy tab:", TAB_TYPE);
|
||||||
|
},
|
||||||
|
destroy() {
|
||||||
|
console.log("destroy tab:", TAB_TYPE);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async onunload() {
|
async onunload() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue