摘要: 在Vue3的项目中,我想进行路由跳转,于是使用 this.$router.push("/newCollect") 报Cannot read property '$router' of undefined错误。 原来该语法只能用于method中,而我是在setup函数中进行路由跳转的。 解决方法为: 阅读全文
posted @ 2022-03-15 15:58 罗毅豪 阅读(10499) 评论(0) 推荐(0) 编辑