feat(frontend): 实现中英文切换与拼写检查

This commit is contained in:
2026-09-05 09:38:23 +08:00
parent a35b577d66
commit ef961d322b
44 changed files with 722 additions and 519 deletions
+10
View File
@@ -5,6 +5,10 @@ import router from './router'
import './styles/tokens.css'
import './styles/features.css'
import { useThemeStore } from './stores/theme'
import { useSettingsStore } from './stores/settings'
import { watch } from 'vue'
import { appLocale } from './i18n'
import { updateDocumentTitle } from './router'
const app = createApp(App)
const pinia = createPinia()
@@ -13,6 +17,12 @@ app.use(pinia)
app.use(router)
const themeStore = useThemeStore()
const settingsStore = useSettingsStore()
themeStore.initTheme()
watch(appLocale, () => updateDocumentTitle())
watch(() => settingsStore.spellCheck, (enabled) => {
document.body.spellcheck = enabled
document.body.setAttribute('spellcheck', String(enabled))
}, { immediate: true })
app.mount('#app')