lint code
This commit is contained in:
@@ -30,7 +30,7 @@ import { computed, ref } from '@common/utils/vueTools'
|
||||
export default {
|
||||
setup() {
|
||||
const lastStartVersion = ref(null)
|
||||
getLastStartInfo().then(version => {
|
||||
void getLastStartInfo().then(version => {
|
||||
lastStartVersion.value = version
|
||||
})
|
||||
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
history: [],
|
||||
isLatest: true,
|
||||
}
|
||||
if (!versionInfo.newVersion || !versionInfo.newVersion?.history) return info
|
||||
if (!versionInfo.newVersion?.history) return info
|
||||
info.isLatest = compareVer(currentVer, versionInfo.newVersion.version) >= 0
|
||||
|
||||
const history = [{ version: versionInfo.newVersion.version, desc: versionInfo.newVersion.desc }, ...versionInfo.newVersion.history]
|
||||
|
||||
@@ -81,11 +81,11 @@ export default {
|
||||
}, 2e3)
|
||||
},
|
||||
handleClose(isExit) {
|
||||
if (isExit) return quitApp(true)
|
||||
if (isExit) { quitApp(true); return }
|
||||
isShowPact.value = false
|
||||
},
|
||||
openUrl(url) {
|
||||
openUrl(url)
|
||||
void openUrl(url)
|
||||
},
|
||||
startTimeout() {
|
||||
window.setTimeout(() => {
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
const listId = playMusicInfo.listId
|
||||
if (!listId || listId == LIST_IDS.DOWNLOAD || !playMusicInfo.musicInfo) return
|
||||
if (playInfo.playIndex == -1) return
|
||||
router.push({
|
||||
void router.push({
|
||||
path: '/list',
|
||||
query: {
|
||||
id: listId,
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
const listId = playMusicInfo.listId
|
||||
if (!listId || listId == LIST_IDS.DOWNLOAD || !playMusicInfo.musicInfo) return
|
||||
if (playInfo.playIndex == -1) return
|
||||
router.push({
|
||||
void router.push({
|
||||
path: '/list',
|
||||
query: {
|
||||
id: listId,
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
const listId = playMusicInfo.listId
|
||||
if (!listId || listId == LIST_IDS.DOWNLOAD || !playMusicInfo.musicInfo) return
|
||||
if (playInfo.playIndex == -1) return
|
||||
router.push({
|
||||
void router.push({
|
||||
path: '/list',
|
||||
query: {
|
||||
id: listId,
|
||||
|
||||
@@ -113,7 +113,7 @@ export default {
|
||||
lyricMenuXY.x = event.pageX
|
||||
lyricMenuXY.y = event.pageY
|
||||
if (lyricMenuVisible.value) return
|
||||
nextTick(() => {
|
||||
void nextTick(() => {
|
||||
lyricMenuVisible.value = true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -55,10 +55,10 @@ const offsetTagRxp = /(?:^|\n)\s*\[offset:\s*(\S+(?:\d+)*)\s*\]/
|
||||
const offsetTagAllRxp = /(^|\n)\s*\[offset:\s*(\S+(?:\d+)*)\s*\]/g
|
||||
|
||||
const saveLyric = debounce((musicInfo, lyricInfo) => {
|
||||
saveLyricEdited(musicInfo, lyricInfo)
|
||||
void saveLyricEdited(musicInfo, lyricInfo)
|
||||
})
|
||||
const removeLyric = debounce(musicInfo => {
|
||||
removeLyricEdited(musicInfo)
|
||||
void removeLyricEdited(musicInfo)
|
||||
})
|
||||
|
||||
const getOffset = lrc => {
|
||||
|
||||
@@ -138,7 +138,7 @@ export default {
|
||||
visibled,
|
||||
isFullscreen,
|
||||
fullscreenExit() {
|
||||
setFullScreen(false).then((fullscreen) => {
|
||||
void setFullScreen(false).then((fullscreen) => {
|
||||
isFullscreen.value = fullscreen
|
||||
})
|
||||
},
|
||||
|
||||
@@ -61,7 +61,7 @@ export default {
|
||||
}
|
||||
const handleSelectMode = (mode) => {
|
||||
if (mode.startsWith('overwrite') && isOverwrite.value) mode += '_full'
|
||||
sendSyncAction({ action: 'select_mode', data: mode })
|
||||
void sendSyncAction({ action: 'select_mode', data: mode })
|
||||
handleClose()
|
||||
}
|
||||
return {
|
||||
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
break
|
||||
case 'listClick':
|
||||
searchText.value = tipList.value[data]
|
||||
nextTick(handleSearch)
|
||||
void nextTick(handleSearch)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
history() {
|
||||
if (!this.versionInfo.newVersion || !this.versionInfo.newVersion?.history) return []
|
||||
if (!this.versionInfo.newVersion?.history) return []
|
||||
let arr = []
|
||||
let currentVer = this.versionInfo.version
|
||||
this.versionInfo.newVersion?.history.forEach(ver => {
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
getIgnoreVersion().then(version => {
|
||||
void getIgnoreVersion().then(version => {
|
||||
this.ignoreVersion = version
|
||||
})
|
||||
},
|
||||
@@ -143,7 +143,7 @@ export default {
|
||||
versionInfo.showModal = false
|
||||
},
|
||||
handleOpenUrl(url) {
|
||||
openUrl(url)
|
||||
void openUrl(url)
|
||||
},
|
||||
handleRestartClick(event) {
|
||||
this.handleClose()
|
||||
@@ -166,7 +166,7 @@ export default {
|
||||
confirmButtonText: window.i18n.t('update__ignore_confirm'),
|
||||
})) {
|
||||
setTimeout(() => {
|
||||
dialog({
|
||||
void dialog({
|
||||
message: window.i18n.t('update__ignore_confirm_tip'),
|
||||
confirmButtonText: window.i18n.t('update__ignore_confirm_tip_confirm'),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user