Merge pull request #118 from hamburgerV/master
This commit is contained in:
@@ -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 = () => {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user