TypeError Cannot read properties of undefined (reading ‘matched‘)vue项目创建之后写路由报错

vue项目创建之后写路由报错
TypeError Cannot read properties of undefined (reading ‘matched‘)vue项目创建之后写路由报错
原代码:
TypeError Cannot read properties of undefined (reading ‘matched‘)vue项目创建之后写路由报错
修改之后代码TypeError Cannot read properties of undefined (reading ‘matched‘)vue项目创建之后写路由报错

在 import 路由文件后,命名为Router,就会出现报错,
原因:
router 才是Vue实例化的配置字段名称,不识别其他的

《一线大厂前端面试题+开发学习笔记+最新架构讲解视频+事站项目讲义》
【https://docs.qq.com/doc/DQVJzbnRIWWNtcVR4】完整内容开源分享

上一篇:微信打开网址添加在浏览器中打开提示 http://caibaojian.com/weixin-tip.html


下一篇:vue 报错 TypeError: Cannot read properties of undefined (reading ‘0‘)