菜鸟级的错误,,,,
[Vue警告]:渲染错误:“TypeError:无法读取属性’匹配’的未定义”

[Vue warn]: Error in render: "TypeError: Cannot read property 'matched' of undefined"[Vue warn]: Error in render: "TypeError: Cannot read property 'matched' of undefined"
没有导出实例,当然匹配不上啊!!!!!!! 改成下面就好了

export default new VueRouter({
   routes: [
        {
            path:'/pf',
            component:Pf
        }
    ]
})

还有一种可能就是 vue实例中的 “参数名” 用错,必须是“router”才可以,否则也是匹配不上

new Vue({
  el: '#app',
  router,  (缩写)相当于 router: router
  render: h => h(App),
})

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-08-04
  • 2022-01-28
  • 2021-05-21
  • 2022-01-16
  • 2022-12-23
猜你喜欢
  • 2021-08-06
  • 2021-05-05
  • 2021-12-03
  • 2022-12-23
  • 2021-07-10
  • 2021-05-24
  • 2021-05-26
相关资源
相似解决方案