You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
834 B
Vue

<script setup lang="ts">
import { computed } from 'vue'
import { useAppStore } from '@/store/modules/app'
import { useLocaleStore } from '@/store/modules/locale'
import { ElConfigProvider } from 'element-plus'
import { ConfigGlobal } from '@/components/ConfigGlobal'
import { isDark } from '@/utils/is'
const appStore = useAppStore()
const localeStore = useLocaleStore()
const local = computed(() => localeStore.locale)
function initDark() {
const isDarkTheme = isDark()
appStore.setIsDark(isDarkTheme)
}
initDark()
</script>
<template>
<ConfigGlobal>
<ElConfigProvider :locale="local.elLocale">
<RouterView />
</ElConfigProvider>
</ConfigGlobal>
</template>
<style lang="less">
.size {
width: 100%;
height: 100%;
}
html,
body {
padding: 0;
margin: 0;
.size;
#app {
.size;
}
}
</style>