diff --git a/src/renderer/store/modules/songList.js b/src/renderer/store/modules/songList.js index c784fd86..2ebb11d5 100644 --- a/src/renderer/store/modules/songList.js +++ b/src/renderer/store/modules/songList.js @@ -105,7 +105,7 @@ const actions = { : music[source]?.songList.getListDetail(id, page).then(result => { cache.set(key, result) return result - }) + }) ?? Promise.reject(new Error('source not found')) } return loadData(id, 1).then(result => { if (result.total <= result.limit) return filterList(result.list) diff --git a/src/renderer/views/songList/SongList.vue b/src/renderer/views/songList/SongList.vue index cd554a33..4b3e0472 100644 --- a/src/renderer/views/songList/SongList.vue +++ b/src/renderer/views/songList/SongList.vue @@ -298,10 +298,13 @@ export default { this.listWidth = this.$refs.tagList.$el.clientWidth + this.$refs.tab.$el.clientWidth + 2 }, handleGetListDetail(id, source, page) { + this.detailLoading = true this.isGetDetailFailed = false return this.getListDetail({ id, source, page }).catch(err => { this.isGetDetailFailed = true return Promise.reject(err) + }).finally(() => { + this.detailLoading = false }) }, async fetchList() {