2022-04-21 18:20:39 +08:00
|
|
|
import { createApp, Directive } from 'vue'
|
2022-04-20 22:40:26 +08:00
|
|
|
import App from './App.vue'
|
2022-04-21 18:20:39 +08:00
|
|
|
import router from './router'
|
|
|
|
import store from './store'
|
|
|
|
import '@/styles/index.scss'
|
|
|
|
import 'normalize.css'
|
|
|
|
import * as directives from '@/directives'
|
|
|
|
import '@/router/permission'
|
|
|
|
import loadSvg from '@/icons'
|
2022-04-20 22:40:26 +08:00
|
|
|
|
2022-04-21 18:20:39 +08:00
|
|
|
const app = createApp(App)
|
|
|
|
// 加载全局 SVG
|
|
|
|
loadSvg(app)
|
|
|
|
// 自定义指令
|
|
|
|
Object.keys(directives).forEach((key) => {
|
|
|
|
app.directive(key, (directives as { [key: string]: Directive })[key])
|
|
|
|
})
|
|
|
|
|
|
|
|
app.use(store).use(router).mount('#app')
|