Vue中问题总结

问题一: Error in render: "TypeError: Cannot read property 'matched' of undefined"

使用路由之后报错,路由书写错误,下面是我写的错误的路由:

这是修改之后正确的:

router 才是Vue实例化的配置字段名称,写个其他的它当然不认识了。真是低级错误。

问题二: Unknown custom element: <router-view> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

没有注册组件

扫描二维码关注公众号,回复: 1452501 查看本文章

Vue.use(Router)

猜你喜欢

转载自www.cnblogs.com/yongyang/p/9133694.html