标签:ace end err pat cat pattern title ror mes
router.onError(error => {
const pattern = /Loading chunk/g;
const isChunkLoadFailed = error.message.match(pattern);
const targetPath = router.history.pending.fullPath;
if (isChunkLoadFailed) {
window.history.replaceState({}, document.title, targetPath);
window.location.reload();
}
});
标签:ace end err pat cat pattern title ror mes
原文地址:https://www.cnblogs.com/tujw/p/12368750.html