初学VUE 2.0----填坑记

本文针对Vue.js及Vue-Router开发过程中常见的错误进行解析,包括TypeError: Cannot read property 'resolve' of undefined、No Vue component was found、[vue-router] Route with name '/customer' does not exist以及无限更新循环等问题,深入分析产生原因并提供解决方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题汇总    持更~~~~~^_^

Q: TypeError: Cannot read property 'resolve' of undefined

在routerlink中没有找到'resolve' 

产生的原因有:

  • 忘记在vue实例中配置router参数注入路由(下图标红框处)

改正:

 

Q:No Vue component was found

产生原因:vue-router的映射路由配置不正确

 

Q:[vue-router] Route with name '/customer' does not exist

产生原因:

router.push中使用了name属性,则router的映射路由配置时也应该添加name属性(如下图)

 

Q:You may have an infinite update loop in a component render function.  found in

产生原因:v-for造成的死循环

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值