20 lines
583 B
TypeScript
20 lines
583 B
TypeScript
import { createApp } from 'vue'
|
|||
|
|
import { createPinia } from 'pinia'
|
||
|
|
import ElementPlus from 'element-plus'
|
||
|
|
import 'element-plus/dist/index.css'
|
||
|
|
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||
|
|
import './styles/theme.css'
|
||
|
|
|
||
|
|
import App from './App.vue'
|
||
|
|
import router from './router'
|
||
|
|
import { useUiStore } from '@/stores/ui'
|
||
|
|
|
||
|
|
const app = createApp(App)
|
||
|
|
const pinia = createPinia()
|
||
|
|
app.use(pinia)
|
||
|
|
// 启动时恢复用户上次选择的主题色板(默认工业紫色)
|
||
|
|
useUiStore(pinia).applyCurrentTheme()
|
||
|
|
app.use(router)
|
||
|
|
app.use(ElementPlus, { locale: zhCn })
|
||
|
|
app.mount('#app')
|