<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'

onMounted(() => {
  nextTick(() => {
    // 初始化主题样式
    handleThemeStyle(useSettingsStore().theme)
    if (getToken()) {
      useProductStore().fetchProductMap()
    }
  })
})
</script>

<style>
/* @import "tailwindcss"; */
</style>
