Failed to resolve directive: link

is component of app, "v-link" is not work but "route.go" is fine. I don't know why. help!

我在router-view外面引用的组件(比如导航栏), v-link 指令不起作用,无法跳转,会报错:Failed to resolve directive: link (found in component: <menubar> ),但是在组件内用click 点击事件下 route.go 是 可以进行路由跳转的。
请教!谢谢!

阅读 9.3k
1 个回答
新手上路,请多包涵

因为v-link在现在的vue版本中已经取消了,要使用router-link,具体可以查看官方文档。

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