按钮功能合并
This commit is contained in:
parent
0fc8dc3f67
commit
272be4d3d8
@ -103,7 +103,6 @@ export default class MusicList {
|
|||||||
if (item.arrayBuffer) {
|
if (item.arrayBuffer) {
|
||||||
event.target.innerText = '喜欢'
|
event.target.innerText = '喜欢'
|
||||||
this.unlike(item)
|
this.unlike(item)
|
||||||
this.remove(item)
|
|
||||||
} else {
|
} else {
|
||||||
event.target.innerText = '移除'
|
event.target.innerText = '移除'
|
||||||
this.ul.querySelector(`#${item.id}`).classList.add('cache')
|
this.ul.querySelector(`#${item.id}`).classList.add('cache')
|
||||||
@ -159,6 +158,7 @@ export default class MusicList {
|
|||||||
this.event.onlike(item, this.list)
|
this.event.onlike(item, this.list)
|
||||||
}
|
}
|
||||||
async unlike(item) {
|
async unlike(item) {
|
||||||
|
this.remove(item)
|
||||||
this.event.onunlike(item, this.list)
|
this.event.onunlike(item, this.list)
|
||||||
}
|
}
|
||||||
async ban(item) {
|
async ban(item) {
|
||||||
|
Loading…
Reference in New Issue
Block a user