admin_new/src/main.ts

23 lines
651 B
TypeScript

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
// 主题系统(必须在 App 之前 import)
import './theme/tokens.scss'
import './theme/themes.scss'
import './styles/global-popper.scss'
import { loadTheme } from './theme/presets'
// 启动时恢复用户主题
document.body.setAttribute('data-theme', loadTheme())
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.use(ElementPlus, { locale: zhCn })
app.mount('#app')