mirror of
https://github.com/siyuan-note/plugin-sample-vite-svelte.git
synced 2025-08-01 16:13:30 +00:00
onDestroy
This commit is contained in:
parent
aba6dfd544
commit
82928ab218
4 changed files with 54 additions and 42 deletions
|
@ -20,7 +20,7 @@ export default class SamplePlugin extends Plugin {
|
|||
{
|
||||
icon: "iconEmoji",
|
||||
"title": "Hello SiYuan",
|
||||
"callback": () => this.openHelloDialog()
|
||||
"callback": () => this.openHelloInDialog()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ export default class SamplePlugin extends Plugin {
|
|||
});
|
||||
}
|
||||
|
||||
private openHelloDialog() {
|
||||
private openHelloInDialog() {
|
||||
this.counter.hello++;
|
||||
let dialog = new Dialog({
|
||||
title: "Hello World",
|
||||
|
@ -55,6 +55,7 @@ export default class SamplePlugin extends Plugin {
|
|||
target: dialog.element.querySelector("#helloPanel"),
|
||||
props: {
|
||||
name: `[${this.counter.hello}]${this.i18n.name}`,
|
||||
i18n: this.i18n.hello
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue