刚接触 知道有两种方法,一种是用路由,一种是原生js的

<a @click="handleClick"></a>

methods:function(){

  handleClick:function(){

    this.$router.push('/free');

    或者 window.location.href = '/free'

  }

}

明天要完善下 ,怎么跳转到查看当前页面和编辑功能,想的是 把后台数据带进去,正确的顺序应该是跳转进去之后,初始化的数据从后台拿到 然后渲染,嗯,应该没错

-----------------------------------------------------------2018-03-28

差点忘记回复了,this.$router.push('/free')后面可以添加参数。this.$router.push('/free?xxx'+'='+aaaaa)

然后跳转的相应页面,可以 通过 this.$route.query.aaaaa  接收到这个id值,就可以查询了

posted on 2018-03-20 20:55  祁祁  阅读(433)  评论(0编辑  收藏  举报