vuex中数据变化对mutations的监听

571 阅读1分钟

现在实现如果mutations 里的对象发生改变则我就将他存到缓存中,将store提取出来,进行订阅store变化,回调函数存在

  • mutations 存在变化的对象
  • type类型(setToken,addCart)