kun-galgame-vue/src/main.ts

25 lines
525 B
TypeScript
Raw Normal View History

2023-04-17 15:20:49 +00:00
// core
2023-05-02 15:22:46 +00:00
import { createApp } from 'vue'
// APP
import App from './App.vue'
2023-04-20 15:34:48 +00:00
/* 引入 vue-router */
2023-05-02 15:22:46 +00:00
import router from './router'
2023-05-19 18:23:25 +00:00
// 引入 i18n
import i18n from '@/language/i18n'
2023-06-05 02:52:35 +00:00
// 引入路由守卫
import { setupRouterGuard } from '@/router/guard'
2023-06-05 02:52:35 +00:00
// 引入 Pinia
import { setupPinia } from '@/store/index'
// 引入样式
import '@/styles/index.scss'
2023-04-20 15:34:48 +00:00
// 获取 App 实例
const app = createApp(App)
// 使用路由守卫
setupRouterGuard(router)
2023-06-14 14:51:50 +00:00
// 使用 pinia
setupPinia(app)
2023-06-14 11:18:27 +00:00
app.use(router).use(i18n).mount('#app')