ES6使用常量做为函数名

重点是 要给常量加一个中括号 就是这么任性~

  [SET_INFO](state) {
    state.userInfo = {
      name: cookie.getCookie('name'),
      token: cookie.getCookie('token')
    }
    console.log(state.userInfo);
  }
posted @ 2019-01-29 18:21  道理我都懂Zz  阅读(1605)  评论(0)    收藏  举报