2022-04-22 01:16:02 +08:00
|
|
|
import { createApp, Directive } from "vue"
|
|
|
|
import App from "./App.vue"
|
|
|
|
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])
|
|
|
|
})
|
|
|
|
|
2022-04-22 01:16:02 +08:00
|
|
|
app.use(store).use(router).mount("#app")
|