新增在歌单详情列表按退格键可快速返回歌单列表
parent
ca4218b309
commit
a8632297eb
|
@ -18,6 +18,7 @@
|
|||
- 新增开关下载功能控制,默认关闭,可到设置-下载设置开启
|
||||
- 新增将歌词嵌入音频文件中,默认关闭,可到设置-下载设置开启
|
||||
- 新增当列表文件损坏时对损坏文件的备份,若出现该情况可打开`%HOMEPATH%\AppData\Roaming\lx-music-desktop`找到`playList.json.bak`尝试手动修复列表文件,列表文件以`JSON`格式存储
|
||||
- 新增在歌单详情列表按退格(Backspace)键可快速返回歌单列表
|
||||
|
||||
### 优化
|
||||
|
||||
|
|
|
@ -172,6 +172,10 @@ export default {
|
|||
this.tagInfo = this.setting.songList.tagInfo
|
||||
this.sortId = this.setting.songList.sortId
|
||||
if (!this.isVisibleListDetail) this.setTagListWidth()
|
||||
this.listenEvent()
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.unlistenEvent()
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['setSongList']),
|
||||
|
@ -180,6 +184,22 @@ export default {
|
|||
...mapActions('download', ['createDownload', 'createDownloadMultiple']),
|
||||
...mapMutations('list', ['listAdd', 'listAddMultiple']),
|
||||
...mapMutations('player', ['setList']),
|
||||
listenEvent() {
|
||||
window.eventHub.$on('key_backspace_down', this.handle_key_backspace_down)
|
||||
},
|
||||
unlistenEvent() {
|
||||
window.eventHub.$off('key_backspace_down', this.handle_key_backspace_down)
|
||||
},
|
||||
handle_key_backspace_down({ event }) {
|
||||
if (!this.isVisibleListDetail ||
|
||||
event.repeat ||
|
||||
this.isShowDownload ||
|
||||
this.isShowDownloadMultiple ||
|
||||
this.isShowListAdd ||
|
||||
this.isShowListAddMultiple ||
|
||||
event.target.classList.contains('key-bind')) return
|
||||
this.hideListDetail()
|
||||
},
|
||||
handleListBtnClick(info) {
|
||||
switch (info.action) {
|
||||
case 'download':
|
||||
|
|
Loading…
Reference in New Issue