From 199fb320e7ba745deab58adb468185db97fcee17 Mon Sep 17 00:00:00 2001 From: frostime Date: Sat, 20 May 2023 16:44:11 +0800 Subject: [PATCH] fix: destroy dock --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 067536d..f68a2d4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -64,7 +64,7 @@ export default class SamplePlugin extends Plugin { }, type: DOCK_TYPE, init() { - new DockExample({ + this.component = new DockExample({ target: this.element, props: { text: this.data.text, @@ -73,6 +73,7 @@ export default class SamplePlugin extends Plugin { }, destroy() { console.log("destroy dock:", DOCK_TYPE); + this.component.$destroy(); } });