vue路由跳转使用path导致栈溢出,使用name就没问题

路由配置:

{
      path: '/alarmHistory',
      name: 'AlarmHistory',
      component: AlarmHistory,
      alias: '/alarmHistory'
    },

事件:

this.$router.push({name: 'AlarmHistory'});

以前的项目都是使用的path进行跳转,今天发现使用path跳转会报错 栈溢出。但是使用name跳转的时候又没问题,请教下这是哪里出了问题。。。

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