Skip to content

Commit

Permalink
DictionaryManageDialogContextをエクスポートする
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkfx committed Dec 11, 2024
1 parent 5c54153 commit eb6ea8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/Dialog/DictionaryEditWordDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@
<script setup lang="ts">
import { inject, ref } from "vue";
import { QInput } from "quasar";
import { DictionaryManageDialogContext } from "./DictionaryManageDialog.vue";
import {
DictionaryManageDialogContext,
DictionaryManageDialogContextKey,
} from "./DictionaryManageDialog.vue";
import AudioAccent from "@/components/Talk/AudioAccent.vue";
import ContextMenu from "@/components/Menu/ContextMenu/Container.vue";
import { useRightClickContextMenu } from "@/composables/useRightClickContextMenu";
Expand All @@ -173,7 +176,7 @@ import type { FetchAudioResult } from "@/store/type";
const store = useStore();
const context = inject<DictionaryManageDialogContext>(
"dictionaryManageDialogContext",
DictionaryManageDialogContextKey,
);
if (context == undefined)
throw new Error(`dictionaryManageDialogContext == undefined`);
Expand Down
2 changes: 2 additions & 0 deletions src/components/Dialog/DictionaryManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export interface DictionaryManageDialogContext {
toWordEditingState: () => void;
cancel: () => void;
}
export const DictionaryManageDialogContextKey = "dictionaryManageDialogContext";
</script>

<script setup lang="ts">
Expand Down

0 comments on commit eb6ea8f

Please sign in to comment.