添加vue eslint规则,修复问题

This commit is contained in:
lyswhut
2021-12-03 23:45:03 +08:00
parent ccd951b5d3
commit 1ab5db8507
35 changed files with 198 additions and 175 deletions
+3 -16
View File
@@ -97,22 +97,9 @@ const usePlayInfoInit = () => {
return downloadList => {
return getPlayInfo().then(info => {
window.restorePlayInfo = null
if (!info) return
if (info.index < 0) return
if (info.listId) {
if (info.listId == 'download') {
const list = downloadList
// console.log(list)
if (!list || !list[info.index]) return
info.list = list
} else {
const list = getList(info.listId)
// console.log(list)
if (!list[info.index]) return
info.list = list
}
}
if (!info.list || !info.list[info.index]) return
if (!info?.listId || info.index < 0) return
const list = getList(info.listId)
if (!list || !list[info.index]) return
window.restorePlayInfo = info
setPlayList({
listId: info.listId,
@@ -182,7 +182,7 @@ export default ({ setting }) => {
},
})
setImg(playMusicInfo)
setImg({ musicInfo: musicInfoItem.value, listId: playMusicInfo.listId })
setLrc(musicInfoItem.value)
if (setting.value.player.togglePlayMethod == 'random') setPlayedList({ ...playMusicInfo })
}