31 lines
645 B
TypeScript
31 lines
645 B
TypeScript
import {createApp} from 'vue'
|
|
import {createPinia} from 'pinia'
|
|
|
|
import './styles/index.scss'
|
|
import "uno.css";
|
|
|
|
import useInterceptor from './interceptor';
|
|
|
|
import App from './App.vue'
|
|
import router from './router'
|
|
import {errorHandler} from './error'
|
|
|
|
import {i18n} from "./i18n"
|
|
|
|
import TitleBar from "./components/common/TitleBar.vue"
|
|
|
|
const app = createApp(App)
|
|
const store = createPinia()
|
|
|
|
app.use(store)
|
|
app.use(router)
|
|
app.use(i18n)
|
|
errorHandler(app)
|
|
|
|
// 全局引入 TitleBar 组件
|
|
app.component("TitleBar", TitleBar);
|
|
|
|
// 执行路由拦截,放在挂载之前的方式(按路由权限标识)
|
|
useInterceptor();
|
|
app.mount("#app")
|