From 2ce424dc6bfb767e6b34bffab40b413e05cf1f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Sun, 1 Oct 2023 11:28:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=A7=BB=E9=99=A4=E9=9F=B3?= =?UTF-8?q?=E4=B9=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/music.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/music.js b/public/music.js index 378a17b..a3e8108 100644 --- a/public/music.js +++ b/public/music.js @@ -121,8 +121,7 @@ export default class MusicList { } } remove(item) { - const el = this.ul.querySelector(`#${item.id}`) - if (el) this.ul.removeChild() + this.ul.querySelector(`#${item.id}`)?.remove() this.stop() // 停止播放 // 执行回调函数 if (this.EventListeners['remove']) {