vue router 配置 component 报错 TypeError: Cannot use 'in' operator to search for 'catch' in undefined

问题描述:

在配置路由文件时,开始时component不小心写成下面的格式
image
打开页面控制台报错如下
image

解决方案:

引入组件的箭头函数忘记写返回。。
image
或者写成一行
image

相当低级的错误。

posted @ 2023-12-21 16:57  Li_pk  阅读(308)  评论(0编辑  收藏  举报