This commit is contained in:
2023-09-29 18:36:05 +08:00
parent 5fd02b4fe3
commit 90377a0334
1 changed files with 17 additions and 1 deletions

View File

@ -78,7 +78,14 @@ export default class MusicList {
innerText: '喜欢', innerText: '喜欢',
onclick: event => { onclick: event => {
event.stopPropagation() event.stopPropagation()
// 留存到本地 this.like(item)
}
}),
Button({
innerText: '禁止',
onclick: event => {
event.stopPropagation()
// BAN
} }
}) })
] ]
@ -116,6 +123,15 @@ export default class MusicList {
this.audio.src = '' this.audio.src = ''
this._on('stop') this._on('stop')
} }
like(item) {
if (!item.arrayBuffer) {
console.log('载入缓存:', item)
return
} else {
console.log('移除缓存:', item)
return
}
}
next() { } next() { }
prev() { } prev() { }
// 添加回调函数 // 添加回调函数