升级到 vue3

This commit is contained in:
lyswhut
2021-12-03 22:11:11 +08:00
parent c6635e554a
commit 8059d9cd73
260 changed files with 14443 additions and 10979 deletions
@@ -0,0 +1,34 @@
import {
computed,
useCommit,
} from '@renderer/utils/vueTools'
export default ({ setting, t }) => {
const setVisibleDesktopLyric = useCommit('setVisibleDesktopLyric')
const setLockDesktopLyric = useCommit('setLockDesktopLyric')
const toggleDesktopLyricBtnTitle = computed(() => {
return `${
setting.value.desktopLyric.enable
? t('player__desktop_lyric_off')
: t('player__desktop_lyric_on')
}(${
setting.value.desktopLyric.isLock
? t('player__desktop_lyric_unlock')
: t('player__desktop_lyric_lock')
})`
})
const toggleDesktopLyric = () => {
setVisibleDesktopLyric(!setting.value.desktopLyric.enable)
}
const toggleLockDesktopLyric = () => {
setLockDesktopLyric(!setting.value.desktopLyric.isLock)
}
return {
toggleDesktopLyricBtnTitle,
toggleDesktopLyric,
toggleLockDesktopLyric,
}
}