[Vue Router warn]: Component “default“ in record with path “/demo2“ is a function that does not retu

问题描述

今天在使用vue-router的路由跳转的时候,发现怎么弄都跳转不了,报错如下图:
[Vue Router warn]: Component “default“ in record with path “/demo2“ is a function that does not retu_第1张图片

问题解决

发现是自己粗心大意,配置路由的时候多写了一个 箭头函数,导致返回的是个promise 。。。。
[Vue Router warn]: Component “default“ in record with path “/demo2“ is a function that does not retu_第2张图片

你可能感兴趣的:(BUG记录,vue.js,前端,vue-router,路由配置)