export default {
data() {
return {
currentSong: ''
}
},
watch: {
currentSong(newSong, oldSong) {
if (newSong.id === oldSong.id) return
this.$refs.audio.play()
}
}
}
export default {
data() {
return {
currentSong: ''
}
},
watch: {
currentSong(newSong, oldSong) {
if (newSong.id === oldSong.id) return
this.$refs.audio.play()
}
}
}
本文标题:vue 监听
本文链接:https://www.haomeiwen.com/subject/xqjsfftx.html
网友评论