add: Select language function add update Settings style

This commit is contained in:
Hakadao
2022-04-07 17:08:17 +08:00
parent 4b58915b17
commit 1ce825f4fc
4 changed files with 70 additions and 9 deletions

View File

@@ -46,13 +46,20 @@
<script setup lang="ts">
import { useToggle, useDark } from '@vueuse/core'
import { apperance, isShowTopbar } from '~/logic/storage'
import { language } from '~/logic'
import 'virtual:windi.css'
import '~/styles/index.ts'
import Home from './Home/index.vue'
import { useI18n } from 'vue-i18n'
const [showSettings, toggle] = useToggle(false)
const isDark = useDark()
const toggleDark = useToggle(isDark)
const { locale } = useI18n()
window.onload = () => {
locale.value = language.value
}
</script>