diff --git a/src/index.ts b/src/index.ts
index ee7db52..8947cf8 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -27,6 +27,8 @@ export default class PluginSample extends Plugin {
async onload() {
this.data[STORAGE_NAME] = {readonlyText: "Readonly"};
+ console.log("loading plugin-sample", this.i18n);
+
const frontEnd = getFrontend();
this.isMobile = frontEnd === "mobile" || frontEnd === "browser-mobile";
// 图标的制作参见帮助文档
@@ -127,6 +129,7 @@ export default class PluginSample extends Plugin {
}
});
+ console.log(this.i18n.helloPlugin);
}
onLayoutReady() {
@@ -156,19 +159,16 @@ export default class PluginSample extends Plugin {
});
}
- private eventBusLog({ detail }: any) {
+ private eventBusLog({detail}: any) {
console.log(detail);
}
- private blockIconEvent({ detail }: any) {
- console.log(detail);
- detail.menu.addSeparator(0);
+ private blockIconEvent({detail}: any) {
const ids: string[] = [];
detail.blockElements.forEach((item: HTMLElement) => {
ids.push(item.getAttribute("data-node-id"));
});
detail.menu.addItem({
- index: 1,
iconHTML: "",
type: "readonly",
label: "IDs
" + ids.join("
"),
@@ -176,10 +176,21 @@ export default class PluginSample extends Plugin {
}
private showDialog() {
- new Dialog({
- title: "Info",
- content: '