Vue.之.路由跳转

Vue.之.路由跳转

  

  在进行项目开发的过程中,需要使用路由进行跳转。如下:

  // 不带有参数,在页面上跳转到别的页面

  1. this.$router.push('/login/init'); 

  // 带有参数

  2. this.$router.push({

    path: '/login/validate',

    query: {

      domain: 'admin'

    }

  });

  获取参数:  this.$route.query.domain 

原文地址:https://www.cnblogs.com/Charles-Yuan/p/11197225.html