fix: destroy dock

This commit is contained in:
frostime 2023-05-20 16:44:11 +08:00
parent de42dc1b55
commit 199fb320e7

View file

@ -64,7 +64,7 @@ export default class SamplePlugin extends Plugin {
}, },
type: DOCK_TYPE, type: DOCK_TYPE,
init() { init() {
new DockExample({ this.component = new DockExample({
target: this.element, target: this.element,
props: { props: {
text: this.data.text, text: this.data.text,
@ -73,6 +73,7 @@ export default class SamplePlugin extends Plugin {
}, },
destroy() { destroy() {
console.log("destroy dock:", DOCK_TYPE); console.log("destroy dock:", DOCK_TYPE);
this.component.$destroy();
} }
}); });