first commit
This commit is contained in:
24
src/main.js
Normal file
24
src/main.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { createApp } from 'vue'
|
||||
import router from '@/router/index'
|
||||
import store from './store'
|
||||
import ElementPlus from 'element-plus'
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||
import 'element-plus/dist/index.css'
|
||||
import App from './App.vue'
|
||||
import directive from '@/utils/directive'
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue'
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
|
||||
// svg图标
|
||||
import 'virtual:svg-icons-register'
|
||||
|
||||
const app = createApp(App)
|
||||
app.use(router)
|
||||
app.use(store)
|
||||
app.component('SvgIcon', SvgIcon)
|
||||
for (const [ key, component ] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component)
|
||||
}
|
||||
app.use(ElementPlus, { locale: zhCn })
|
||||
directive(app)
|
||||
app.mount('#app')
|
||||
Reference in New Issue
Block a user