forked from VOICEVOX/voicevox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ContextMenuをContainer/Presentationに分離する (VOICEVOX#2376)
Co-authored-by: Hiroshiba <hihokaruta@gmail.com>
- Loading branch information
1 parent
7552ace
commit a6a4c21
Showing
10 changed files
with
47 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!-- StoreのUI_LOCKEDを参照してContextMenuを表示する --> | ||
|
||
<template> | ||
<Presentation ref="contextMenu" :header :menudata :uiLocked /> | ||
</template> | ||
|
||
<script lang="ts"> | ||
export type { ContextMenuItemData } from "./Presentation.vue"; | ||
</script> | ||
<script setup lang="ts"> | ||
import { computed, useTemplateRef } from "vue"; | ||
import type { ComponentExposed } from "vue-component-type-helpers"; | ||
import Presentation, { ContextMenuItemData } from "./Presentation.vue"; | ||
import { useStore } from "@/store"; | ||
|
||
defineOptions({ | ||
name: "ContextMenu", | ||
}); | ||
|
||
defineProps<{ | ||
header?: string; | ||
menudata: ContextMenuItemData[]; | ||
}>(); | ||
defineExpose({ | ||
hide: () => { | ||
contextMenu.value?.hide(); | ||
}, | ||
}); | ||
|
||
const store = useStore(); | ||
const uiLocked = computed(() => store.getters.UI_LOCKED); | ||
const contextMenu = | ||
useTemplateRef<ComponentExposed<typeof Presentation>>("contextMenu"); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters