样式如图所示
<template>
<div class="audio-player">
<div class="player_top" flex-ac flex-justify-between >
<div class="fileName genericTitle" fs-28 l-height-32 height-64 pr-42 flex-ac>
<span class="text-line-2">{
{ fileName }}</span>
</div>
<div class="play_btn">
<div class="toPlay" width-60 height-60 v-if="!playStatus" @click="onPlay"></div>
<div class="toStop" width-60 height-60 v-else @click="onPause"></div>
</div>
</div>
<div class="player_time" fs-14 mt-13 mb-8 flex flex-justify-between>
<span class="play_audioCurrent" style="color:#1e62d9"> {
{ transTime(audioCurrent) }} </span>
<span class="play_audioDuration" style="color:#A5A5A5"> {
{ transTime(audioDuration) }} </span>
</div>
<div class="play_progress" pl-13 pr-13>
<el-slider v-model="playProgress" :show-tooltip="false" @input="onProgressChange" />
</div>
</div>
<audio ref="audioRef" :src="url" @canplay="onCanplay" @timeupdate="updateProgress" @ended="playEnd" />
</template>
<script setup lang="ts">
import { ref, onBeforeMount, onUnmounted, onMounted, watch, nextTick } from 'vue';
const props &