gohttpdUi/src/App.vue

43 lines
649 B
Vue
Raw Normal View History

2021-12-08 10:47:33 +08:00
<script setup lang="ts">
import { computed } from 'vue'
2021-12-31 17:19:53 +08:00
import { useAppStore } from '@/store/modules/app'
import { ConfigGlobal } from '@/components/ConfigGlobal'
2021-12-31 17:19:53 +08:00
import { isDark } from '@/utils/is'
const appStore = useAppStore()
2022-01-03 18:01:43 +08:00
const size = computed(() => appStore.size)
const initDark = () => {
2021-12-31 17:19:53 +08:00
const isDarkTheme = isDark()
appStore.setIsDark(isDarkTheme)
}
2022-01-03 18:01:43 +08:00
2021-12-31 17:19:53 +08:00
initDark()
2021-12-08 10:47:33 +08:00
</script>
<template>
2022-01-03 18:01:43 +08:00
<ConfigGlobal :size="size">
2022-01-07 09:12:32 +08:00
<RouterView />
</ConfigGlobal>
</template>
2021-12-31 17:19:53 +08:00
<style lang="less">
.size {
width: 100%;
height: 100%;
}
html,
body {
padding: 0;
margin: 0;
2022-01-13 17:26:06 +08:00
overflow: hidden;
2021-12-31 17:19:53 +08:00
.size;
#app {
.size;
}
}
</style>