mirror of
https://github.com/siyuan-note/plugin-sample-vite-svelte.git
synced 2025-06-08 02:46:02 +00:00
onload
done
This commit is contained in:
parent
4dbc215a0e
commit
9f8f1fb69e
1 changed files with 9 additions and 9 deletions
12
src/index.ts
12
src/index.ts
|
@ -19,9 +19,9 @@ const STORAGE_NAME = "menu-config";
|
|||
const TAB_TYPE = "custom_tab";
|
||||
const DOCK_TYPE = "dock_tab";
|
||||
|
||||
export default class SamplePlugin extends Plugin {
|
||||
export default class PluginSample extends Plugin {
|
||||
|
||||
private customTab: () => any;
|
||||
private customTab: () => IModel;
|
||||
private isMobile: boolean;
|
||||
|
||||
async onload() {
|
||||
|
@ -69,9 +69,9 @@ export default class SamplePlugin extends Plugin {
|
|||
element: statusIconTemp.content.firstElementChild as HTMLElement,
|
||||
});
|
||||
|
||||
let div = document.createElement("div");
|
||||
let tabDiv = document.createElement("div");
|
||||
new HelloExample({
|
||||
target: div,
|
||||
target: tabDiv,
|
||||
props: {
|
||||
name: this.i18n.name,
|
||||
i18n: this.i18n.hello
|
||||
|
@ -80,7 +80,7 @@ export default class SamplePlugin extends Plugin {
|
|||
this.customTab = this.addTab({
|
||||
type: TAB_TYPE,
|
||||
init() {
|
||||
this.element.appendChild(div);
|
||||
this.element.appendChild(tabDiv);
|
||||
console.log(this.element);
|
||||
},
|
||||
destroy() {
|
||||
|
@ -100,7 +100,7 @@ export default class SamplePlugin extends Plugin {
|
|||
config: {
|
||||
position: "LeftBottom",
|
||||
size: {width: 200, height: 0},
|
||||
icon: "iconEmoji",
|
||||
icon: "iconSaving",
|
||||
title: "Custom Dock",
|
||||
},
|
||||
data: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue