Skip to content

Commit

Permalink
AccentPhrase全てにidを振ろうとした
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Feb 27, 2024
1 parent 7606c95 commit 4747be3
Show file tree
Hide file tree
Showing 9 changed files with 219 additions and 132 deletions.
6 changes: 3 additions & 3 deletions src/components/Dialog/DictionaryManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ import { computed, ref, watch } from "vue";
import { QInput } from "quasar";
import AudioAccent from "@/components/Talk/AudioAccent.vue";
import { useStore } from "@/store";
import type { FetchAudioResult } from "@/store/type";
import { AccentPhrase, UserDictWord } from "@/openapi";
import type { EditorAccentPhrase, FetchAudioResult } from "@/store/type";
import { UserDictWord } from "@/openapi";
import {
convertHiraToKana,
convertLongVowel,
Expand Down Expand Up @@ -360,7 +360,7 @@ const voiceComputed = computed(() => {
const kanaRegex = createKanaRegex();
const isOnlyHiraOrKana = ref(true);
const accentPhrase = ref<AccentPhrase | undefined>();
const accentPhrase = ref<EditorAccentPhrase | undefined>();
const accentPhraseTable = ref<HTMLElement>();
const convertHankakuToZenkaku = (text: string) => {
Expand Down
5 changes: 1 addition & 4 deletions src/components/Talk/AudioDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</ToolTip>
<AccentPhrase
v-for="(accentPhrase, accentPhraseIndex) in accentPhrases"
:key="accentPhrase.editorID"
:key="accentPhrase.key"
ref="accentPhraseComponents"
:audio-key="activeAudioKey"
:accent-phrase="accentPhrase"
Expand Down Expand Up @@ -234,9 +234,6 @@ const setPlayAndStartPoint = (accentPhraseIndex: number) => {
};
watch(accentPhrases, async () => {
await store.dispatch("SET_ACCENT_PHRASES_EDITORID", {
audioKey: props.activeAudioKey,
});
activePoint.value = startPoint.value;
// 連続再生時に、最初に選択されていた場所に戻るためにscrollToActivePointを呼ぶ必要があるが、
// DOMの描画が少し遅いので、nextTickをはさむ
Expand Down
Loading

0 comments on commit 4747be3

Please sign in to comment.