一、vuex数据持久化

  1. npm install vuex-persistedstate

  2. import createPersistedState from 'vuex-persistedstate'

      const store = new Vuex.Store({

        modules: {
      app,
      user
       },
       getters,
       plugins: [createPersistedState()] //加上这个就可以了
     })

相关文章:

  • 2021-08-30
  • 2021-08-13
  • 2021-12-02
  • 2021-11-24
  • 2022-02-01
  • 2021-12-16
  • 2022-12-23
  • 2021-11-22
猜你喜欢
  • 2021-11-26
  • 2021-11-27
  • 2022-12-23
  • 2021-10-13
  • 2021-04-05
  • 2021-05-24
  • 2021-06-16
相关资源
相似解决方案