From a61623f7887a78170e5ab91d1fbf7929ce0e82fd Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期四, 02 十一月 2023 11:40:44 +0800 Subject: [PATCH] “去掉点击站点时页面上的搜索框和排名清单” --- src/main.js | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 92e15e6..04920ab 100644 --- a/src/main.js +++ b/src/main.js @@ -8,7 +8,8 @@ import { ElMessage } from 'element-plus' // 鍏ㄥ眬寮曞叆鏍峰紡 import 'element-plus/theme-chalk/src/index.scss' - +import pinia from './stores/index'; +import { useLoadingStore } from "@/stores/loadingStore"; const app = createApp(App) @@ -24,6 +25,14 @@ next() } }) + + +const loadingStore = useLoadingStore(pinia) +router.afterEach((to, from) => { + loadingStore.clearLoading() +}) + + // 鏈湴 // axios.defaults.baseURL = 'http://localhost:8081' // 閮ㄧ讲 @@ -33,6 +42,6 @@ app.use(ElMessage) app.config.globalProperties.$message = ElMessage app.use(router) - +app.use(pinia) app.mount('#app') -- Gitblit v1.9.3