刚开始我是用this.$router.push()方法跳转的
但是这样子在控制台上会报错,然后我就将this打印出来发现是{} 后来将router引入就可以解决问题 import router from ‘@/router’