vue路由跳转

Posted yxyuanxiang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vue路由跳转相关的知识,希望对你有一定的参考价值。

// 保存
    saveData() {
      teacher.save(this.teacher).then(response => {
        return this.$message({
          type: ‘success‘,
          message: ‘保存成功!‘
        })
      }).then(resposne => {
        // 路由跳转,添加完成后跳转到列表页面
        this.$router.push({ path: ‘/edu/teacher‘ })
      }).catch((response) => {
        // console.log(response)
        this.$message({
          type: ‘error‘,
          message: ‘保存失败‘
        })
      })
    }

以上是关于vue路由跳转的主要内容,如果未能解决你的问题,请参考以下文章