keep going with api porting in nuxt

This commit is contained in:
lesion
2019-04-23 13:45:52 +00:00
parent 35fa25c060
commit eed3896396
17 changed files with 191 additions and 136 deletions

8
plugins/vuex-persist.js Normal file
View File

@@ -0,0 +1,8 @@
// ~/plugins/vuex-persist.js
import VuexPersistence from 'vuex-persist'
export default ({ store }) => {
return new VuexPersistence({
reducer: state => ({ logged: state.logged, user: state.user, token: state.token })
}).plugin(store)
}