给录音播放的列表加个播放按键,点击之后再播放录音。减少页面的渲染录音文件数量过多导致加载缓慢


javascript
<ElTable.TableColumn
align="center"
label="录音音频播放"
prop="recordLocationUrl"
min-width="320"
>
<template #default="{ row }">
<div v-if="row.isplay === true">
<audio ref="audio" controls :src="row.recordLocationUrl" />
</div>
<ElButton
v-else
@click="clickaudio(row)"
:disabled="row.recordLocationUrl ? false : true"
>
播放录音音频
</ElButton>
</template>
</ElTable.TableColumn>
function clickaudio(elem: any) {
elem.isplay = true;
}