2976e196f7
- 添加 main.ts,初始化 Vue 应用、注册插件(Pinia、Router、Element Plus) - 添加 App.vue,根组件 - 添加 env.d.ts,TypeScript 类型声明
23 lines
538 B
TypeScript
23 lines
538 B
TypeScript
import { createApp } from 'vue'
|
|
import { createPinia } from 'pinia'
|
|
import ElementPlus from 'element-plus'
|
|
import 'element-plus/dist/index.css'
|
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
|
|
import App from './App.vue'
|
|
import router from './router'
|
|
import './styles/global.css'
|
|
|
|
const app = createApp(App)
|
|
|
|
// 注册 Element Plus 图标
|
|
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
app.component(key, component)
|
|
}
|
|
|
|
app.use(createPinia())
|
|
app.use(router)
|
|
app.use(ElementPlus)
|
|
|
|
app.mount('#app')
|