Files
GEAR-OA/gear-ui3/src/App.vue
2025-09-17 14:13:25 +08:00

31 lines
640 B
Vue

<template>
<router-view />
</template>
<script setup>
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
import useProductStore from '@/store/modules/product'
import { getToken } from '@/utils/auth'
import { useDark } from '@vueuse/core'
const isDark = useDark()
onMounted(() => {
nextTick(() => {
console.log(isDark.value)
if (isDark.value) {
useSettingsStore().toggleTheme()
}
handleThemeStyle(useSettingsStore().theme)
if (getToken()) {
useProductStore().fetchProductMap()
}
})
})
</script>
<style>
/* @import "tailwindcss"; */
</style>