style: 移除对路由异常的捕获

This commit is contained in:
pany 2022-08-26 15:40:40 +08:00
parent e4bbd2a277
commit 481929a502

View File

@ -24,14 +24,10 @@ const pathCompile = (path: string) => {
const handleLink = (item: RouteLocationMatched) => { const handleLink = (item: RouteLocationMatched) => {
const { redirect, path } = item const { redirect, path } = item
if (redirect) { if (redirect) {
router.push(redirect as string).catch((err) => { router.push(redirect as string)
console.warn(err)
})
return return
} }
router.push(pathCompile(path)).catch((err) => { router.push(pathCompile(path))
console.warn(err)
})
} }
watch( watch(