Преглед изворни кода

:art: https://github.com/siyuan-note/siyuan/issues/10065

Vanessa пре 1 година
родитељ
комит
a04f7107fd
2 измењених фајлова са 4 додато и 0 уклоњено
  1. 3 0
      app/src/card/openCard.ts
  2. 1 0
      app/src/types/index.d.ts

+ 3 - 0
app/src/card/openCard.ts

@@ -143,6 +143,9 @@ export const bindCardEvent = (options: {
     dialog?: Dialog,
     index?: number
 }) => {
+    options.app.plugins.forEach(item => {
+        item.eventBus.emit("update-cards", options);
+    });
     if (window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen) {
         fullscreen(options.element.querySelector(".card__main"),
             options.element.querySelector('[data-type="fullscreen"]'));

+ 1 - 0
app/src/types/index.d.ts

@@ -64,6 +64,7 @@ type TEventBus = "ws-main" | "sync-start" | "sync-end" | "sync-fail" |
     "loaded-protyle" | "loaded-protyle-dynamic" | "loaded-protyle-static" |
     "switch-protyle" |
     "destroy-protyle" |
+    "update-cards"|
     "lock-screen" |
     "mobile-keyboard-show" | "mobile-keyboard-hide"
 type TAVCol =