vue ...mapMutations 的第一个参数默认为 数据对象state

1.实现回调后 路由的跳转

  mutationsLoginHeaderBackFun(state,$router) {
    console.log(state);
    console.log($router);
    $router.push({path:'/registration'})

    if (state.loginInputShow === false) {
      state.loginInputShow = true;
      state.login.loginPasswordButtonActive = false; //disable button
    } else { // 跳去 首页

    }
  },

  

posted on 2018-08-03 10:32  童彪  阅读(339)  评论(0编辑  收藏  举报

导航