18 lines
749 B
JavaScript
18 lines
749 B
JavaScript
// main.js —— B1 归属。应用入口。
|
|||
|
|
// 主题初始化必须在 createApp 之前同步执行(UI_SPEC §6,防闪白)。
|
||
|
|
// index.html 中 <html data-theme="dark"> 硬编码兜底;此处按 localStorage 覆盖。
|
||
|
|
import { createApp } from 'vue';
|
||
|
|
import { createPinia } from 'pinia';
|
||
|
|
import App from './App.vue';
|
||
|
|
import './styles/tokens.css';
|
||
|
|
import './styles/base.css';
|
||
|
|
import './styles/animations.css';
|
||
|
|
import './styles/responsive.css';
|
||
|
|
import { applyTheme } from './stores/theme.js';
|
||
|
|
|
||
|
|
/* ---------- 防闪白:挂载前同步应用主题(FR-SHELL-007 初始化顺序) ---------- */
|
||
|
|
const t = localStorage.getItem('pa-theme');
|
||
|
|
if (t === 'light' || t === 'dark') applyTheme(t);
|
||
|
|
|
||
|
|
createApp(App).use(createPinia()).mount('#app');
|