新增设置-基本设置-软件字体设置

This commit is contained in:
lyswhut
2022-02-20 17:22:58 +08:00
parent 83ddf74890
commit 5eb9107adf
10 changed files with 36 additions and 3 deletions
+8 -1
View File
@@ -20,13 +20,20 @@ import useApp from '@renderer/core/useApp'
export default {
setup() {
const theme = useRefGetter('theme')
const font = useRefGetter('font')
const dom_root = document.getElementById('root')
watch(theme, (val) => {
dom_root.className = val
}, {
immediate: true,
})
watch(font, (val) => {
document.documentElement.style.fontFamily = val
}, {
immediate: true,
})
dom_root.className = theme.value
useApp()