<script>
data() {
return {
src: "",
dialogVisible: false,
}
methods: {
//播放组件
handlePlay(row) {
this.src = row.filePath;
this.play();
});
},
//播放
play() {
this.dialogVisible = true;
this.$refs.audio.play();
},
//音频暂停
stop() {
this.dialogVisible = false;
this.$refs.audio.pause();
this.$refs.audio.currentTime = 0;
}
}
</script>