import { nextTick, onMounted, ref } from 'vue'; import { useUserStore } from '/@/store/modules/user.ts'; import { setTheme } from '/@/assets/theme/themeList.ts'; export function useTheme() { const themeType = ref('dark'); onMounted(() => { const store = useUserStore(); nextTick(() => { themeType.value = store.getThemeType; setTheme(themeType.value); }); }); return { themeType, }; }