This commit is contained in:
熊成强 2020-11-23 15:18:01 +08:00
parent 4182fa23ed
commit 68c7aca186

View File

@ -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)
}
})