优化
This commit is contained in:
parent
4182fa23ed
commit
68c7aca186
@ -61,13 +61,3 @@ router.afterEach(async () => {
|
|||||||
|
|
||||||
await store.dispatch('GET_DEPLIST')
|
await store.dispatch('GET_DEPLIST')
|
||||||
})
|
})
|
||||||
|
|
||||||
router.onError((error) => {
|
|
||||||
const pattern = /Loading chunk (\d)+ failed/g
|
|
||||||
console.log('xcq --- pattern: ', pattern)
|
|
||||||
const isChunkLoadFailed = error.message.match(pattern)
|
|
||||||
const targetPath = router.history.pending.fullPath
|
|
||||||
if (isChunkLoadFailed) {
|
|
||||||
router.replace(targetPath)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user