vuex刷新数据清空问题 在vue项目中我们一般会用到Vuex对数据进行管理,但我们刷新页面时,store数据会全部丢失,解决方案如下: 先安装vuex-persistedstatenpm install --save vuex-persistedstate在store中使用 重启项目 就ok了!