From f1e3d8ebf070837d255899f2ef69450a7bf5a05b Mon Sep 17 00:00:00 2001 From: qier222 Date: Tue, 27 Apr 2021 16:51:37 +0800 Subject: [PATCH] fix: bugs --- src/components/ModalAddTrackToPlaylist.vue | 6 +++++ src/components/ModalNewPlaylist.vue | 6 +++++ src/electron/ipcRenderer.js | 3 +++ src/views/album.vue | 13 ++++++++-- src/views/library.vue | 8 ++----- src/views/playlist.vue | 13 ++++++++-- src/views/settings.vue | 28 ++++++++++++---------- 7 files changed, 54 insertions(+), 23 deletions(-) diff --git a/src/components/ModalAddTrackToPlaylist.vue b/src/components/ModalAddTrackToPlaylist.vue index 5e35dc8..b8b5bf6 100644 --- a/src/components/ModalAddTrackToPlaylist.vue +++ b/src/components/ModalAddTrackToPlaylist.vue @@ -32,6 +32,7 @@ import { mapActions, mapMutations, mapState } from 'vuex'; import Modal from '@/components/Modal.vue'; import { userPlaylist } from '@/api/user'; import { addOrRemoveTrackFromPlaylist } from '@/api/playlist'; +import { disableScrolling, enableScrolling } from '@/utils/ui'; export default { name: 'ModalAddTrackToPlaylist', @@ -55,6 +56,11 @@ export default { key: 'show', value, }); + if (value) { + disableScrolling(); + } else { + enableScrolling(); + } }, }, ownPlaylists() { diff --git a/src/components/ModalNewPlaylist.vue b/src/components/ModalNewPlaylist.vue index 6f6b5cf..7530808 100644 --- a/src/components/ModalNewPlaylist.vue +++ b/src/components/ModalNewPlaylist.vue @@ -32,6 +32,7 @@ import Modal from '@/components/Modal.vue'; import { mapMutations, mapState } from 'vuex'; import { createPlaylist, addOrRemoveTrackFromPlaylist } from '@/api/playlist'; +import { disableScrolling, enableScrolling } from '@/utils/ui'; export default { name: 'ModalNewPlaylist', @@ -56,6 +57,11 @@ export default { key: 'show', value, }); + if (value) { + disableScrolling(); + } else { + enableScrolling(); + } }, }, }, diff --git a/src/electron/ipcRenderer.js b/src/electron/ipcRenderer.js index dbc1da2..da3ccb5 100644 --- a/src/electron/ipcRenderer.js +++ b/src/electron/ipcRenderer.js @@ -20,6 +20,9 @@ export function ipcRenderer(vueInstance) { ipcRenderer.on('changeRouteTo', (event, path) => { self.$router.push(path); + if (store.state.showLyrics) { + store.commit('toggleLyrics'); + } }); ipcRenderer.on('search', () => { diff --git a/src/views/album.vue b/src/views/album.vue index f2cceee..251e861 100644 --- a/src/views/album.vue +++ b/src/views/album.vue @@ -38,7 +38,7 @@ >, {{ albumTime | formatTime('Human') }} -
+
{{ album.description }}
@@ -104,7 +104,7 @@
diff --git a/src/views/library.vue b/src/views/library.vue index 5e43917..d734811 100644 --- a/src/views/library.vue +++ b/src/views/library.vue @@ -124,12 +124,8 @@
全部歌单

-
- 我创建的歌单 -
-
- 收藏的歌单 -
+
创建的歌单
+
收藏的歌单
diff --git a/src/views/playlist.vue b/src/views/playlist.vue index 34c382f..10bffa1 100644 --- a/src/views/playlist.vue +++ b/src/views/playlist.vue @@ -49,7 +49,7 @@ {{ playlist.updateTime | formatDate }} · {{ playlist.trackCount }} {{ $t('common.songs') }} -
+
{{ playlist.description }}
@@ -160,7 +160,7 @@ diff --git a/src/views/settings.vue b/src/views/settings.vue index 0354685..d273962 100644 --- a/src/views/settings.vue +++ b/src/views/settings.vue @@ -397,7 +397,7 @@