ES6使用常量做为函数名

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

  [SET_INFO](state) {
    state.userInfo = {
      name: cookie.getCookie('name'),
      token: cookie.getCookie('token')
    }
    console.log(state.userInfo);
  }
原文地址:https://www.cnblogs.com/wenqiangit/p/10335384.html