Merge pull request #118 from hamburgerV/master

This commit is contained in:
Zyronon
2025-10-08 16:43:47 +08:00
committed by GitHub
11 changed files with 133 additions and 8 deletions

View File

@@ -119,9 +119,14 @@ const handlePause = () => {
isPlaying.value = false;
};
const emit = defineEmits<{
ended: []
}>();
const handleEnded = () => {
isPlaying.value = false;
currentTime.value = 0;
emit('ended');
};
const handleError = () => {

View File

@@ -47,7 +47,8 @@ defineExpose({scrollToBottom, scrollToItem})
<slot name="prefix" :item="item" :index="index"></slot>
</template>
<template v-slot="{ item, index }">
<div class="item-title">
<div class="item-title word-title">
<span class="index">{{ index + 1 }}.</span>
<span class="word" :class="!showWord && 'word-shadow'">{{ item.word }}</span>
<span class="phonetic" :class="!showWord && 'word-shadow'">{{ item.phonetic0 }}</span>
<VolumeIcon class="volume" @click="playWordAudio(item.word)"></VolumeIcon>
@@ -72,5 +73,10 @@ defineExpose({scrollToBottom, scrollToItem})
</template>
<style scoped lang="scss">
.word-title{
display: flex;
span{
flex-shrink: 0;
}
}
</style>