src/main.js
@@ -8,10 +8,10 @@ import { ElMessage } from 'element-plus' // 全局引入样式 import 'element-plus/theme-chalk/src/index.scss' import pinia from './stores/index'; import { useLoadingStore } from "@/stores/loadingStore"; import { createPinia } from 'pinia' const app = createApp(App) const pinia = createPinia() router.beforeEach((to,from,next)=>{ const token = Cookie.get('token') @@ -27,10 +27,8 @@ }) const loadingStore = useLoadingStore(pinia) router.afterEach((to, from) => { loadingStore.clearLoading() }) // 本地