[Vue warn]: Error in render: "InternalError: too much recursion"

vue的路由中报错

vue-router报错

相关代码

[Vue warn]: Error in render: "InternalError: too much recursion"

found in

---> <RouterLink>
       <ElTooltip>
         <VHead> at src\components\common\Header.vue
           <Home> at src\components\common\Home.vue
             <App> at src\App.vue
               <Root> vue.runtime.esm.js:587
InternalError: "too much recursion"
matchRoute http://localhost:8080/app.js:72289:11
    match http://localhost:8080/app.js:72171:13
    redirect http://localhost:8080/app.js:72231:14
    _createRoute http://localhost:8080/app.js:72270:14
    match http://localhost:8080/app.js:72172:18
    redirect http://localhost:8080/app.js:72231:14
    _createRoute http://localhost:8080/app.js:72270:14
    match http://localhost:8080/app.js:72172:18
    redirect http://localhost:8080/app.js:72231:14
    _createRoute http://localhost:8080/app.js:72270:14
    match http://localhost:8080/app.js:72172:18
    redirect http://localhost:8080/app.js:72231:14
    _createRoute http://localhost:8080/app.js:72270:14
    match http://localhost:8080/app.js:72172:18
    redirect http://localhost:8080/app.js:72231:14
    _createRoute http://localhost:8080/app.js:72270:14
    match http://localhost:8080/app.js:72172:18
    redirect http://localhost:8080/app.js:72231:14
    _createRoute http://localhost:8080/app.js:72270:14
    match http://localhost:8080/app.js:72172:18
…………………………………………//还有百来行

求教是哪里出了问题,怎么修复

阅读 8.8k
3 个回答
✓ 已被采纳新手上路,请多包涵

头部组件中有一个没对应的<router-link to="/tabs">标签
就是router里面没定义过
注释掉就好了、没有警告了

你在写循环的时候,应该是写出了死循环。这个报错就是因为你用了太多次递归,才报错的

路由跳转写成无限循环了吧

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题