替换程序中所有同步API的调用

This commit is contained in:
lyswhut
2020-04-26 22:08:23 +08:00
parent cdbedf3d64
commit 9ff5147418
9 changed files with 73 additions and 43 deletions
+4 -4
View File
@@ -262,9 +262,9 @@ export default {
this.handleStartTask(index)
}
},
handlePlay(index) {
async handlePlay(index) {
const targetSong = this.list[index]
if (!checkPath(path.join(this.setting.download.savePath, targetSong.fileName))) return
if (!await checkPath(path.join(this.setting.download.savePath, targetSong.fileName))) return
this.setList({ list: this.list, listId: 'download', index: this.list.findIndex(i => i.key === targetSong.key) })
},
handleListBtnClick(info) {
@@ -333,9 +333,9 @@ export default {
}
this.removeAllSelect()
},
handleOpenFolder(index) {
async handleOpenFolder(index) {
let path = this.list[index].filePath
if (!checkPath(path)) return
if (!await checkPath(path)) return
openDirInExplorer(path)
},
handleSearch(index) {