Files
FiDA_Front/src/router/router-config.ts
2026-02-04 11:27:45 +08:00

12 lines
238 B
TypeScript

import router from './index'
import { useGlobalStore } from '@/stores/global'
router.beforeEach((to, from, next) => {
useGlobalStore().setViewLoading(true)
next()
})
router.afterEach(() => {
useGlobalStore().setViewLoading(false)
})