|
|
@@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div class="hello"> |
|
|
|
<div class="player"> |
|
|
|
<!-- <div class="player"> |
|
|
|
{{ currentAudioName || audioList[0].name }} |
|
|
|
<audio-player |
|
|
|
ref="audioPlayer" |
|
|
@@ -11,11 +11,13 @@ |
|
|
|
theme-color="#ff2929" |
|
|
|
@playing="playing" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import 'APlayer/dist/APlayer.min.css'; |
|
|
|
import APlayer from 'APlayer'; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
@@ -34,17 +36,17 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleBeforePlay(next) { |
|
|
|
// 这里可以做一些事情... |
|
|
|
this.currentAudioName = |
|
|
|
this.audioList[this.$refs.audioPlayer.currentPlayIndex].name; |
|
|
|
console.log("我要开始播放了"); |
|
|
|
// handleBeforePlay(next) { |
|
|
|
// // 这里可以做一些事情... |
|
|
|
// this.currentAudioName = |
|
|
|
// this.audioList[this.$refs.audioPlayer.currentPlayIndex].name; |
|
|
|
// console.log("我要开始播放了"); |
|
|
|
|
|
|
|
next(); // 开始播放 |
|
|
|
}, |
|
|
|
playing(e) { |
|
|
|
console.log("我播放中", this.$refs.audioPlayer.currentTime); |
|
|
|
}, |
|
|
|
// next(); // 开始播放 |
|
|
|
// }, |
|
|
|
// playing(e) { |
|
|
|
// console.log("我播放中", this.$refs.audioPlayer.currentTime); |
|
|
|
// }, |
|
|
|
}, |
|
|
|
mounted() {}, |
|
|
|
}; |
|
|
|