diff --git a/package.json b/package.json
index 77a089d..20ff17f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "plugin-sample-vite-svelte",
- "version": "0.0.4",
+ "version": "0.0.6",
"type": "module",
"description": "",
"repository": "",
diff --git a/src/dock.svelte b/src/dock.svelte
deleted file mode 100644
index a380d69..0000000
--- a/src/dock.svelte
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
- Custom Dock
-
-
-
-
-
- {text}
-
-
diff --git a/src/index.ts b/src/index.ts
index 5e566c4..e2f27cd 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,8 +1,7 @@
-import { Plugin, showMessage, confirm, Dialog, Menu, isMobile, openTab } from "siyuan";
+import { Plugin, showMessage, confirm, Dialog, Menu, isMobile, openTab, adaptHotkey } from "siyuan";
import "./index.scss";
import HelloExample from "./hello.svelte";
-import DockExample from "./dock.svelte";
import SettingPannel from "./libs/setting-panel.svelte";
const STORAGE_NAME = "menu-config";
@@ -48,7 +47,7 @@ export default class SamplePlugin extends Plugin {
this.addDock({
config: {
position: "LeftBottom",
- size: { width: 200, height: 0 },
+ size: {width: 200, height: 0},
icon: "iconEmoji",
title: "Custom Dock",
},
@@ -57,16 +56,22 @@ export default class SamplePlugin extends Plugin {
},
type: DOCK_TYPE,
init() {
- this.component = new DockExample({
- target: this.element,
- props: {
- text: this.data.text,
- }
- });
+ this.element.innerHTML = `
+
+
+
+ Custom Dock
+
+
+
+
+
+ ${this.data.text}
+
+
`;
},
destroy() {
console.log("destroy dock:", DOCK_TYPE);
- this.component.$destroy();
}
});