Files
FiDA_Front/src/router/router-config.ts

12 lines
238 B
TypeScript
Raw Normal View History

2026-02-02 13:32:33 +08:00
import router from './index'
2026-02-04 11:27:45 +08:00
import { useGlobalStore } from '@/stores/global'
2026-02-02 13:32:33 +08:00
router.beforeEach((to, from, next) => {
2026-02-04 11:27:45 +08:00
useGlobalStore().setViewLoading(true)
2026-02-02 13:32:33 +08:00
next()
})
router.afterEach(() => {
2026-02-04 11:27:45 +08:00
useGlobalStore().setViewLoading(false)
2026-02-02 13:32:33 +08:00
})