添加了localStorage支持
This commit is contained in:
parent
c96252d46c
commit
b50a4c9177
@ -1,4 +1,5 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import createPersistedState from 'vuex-persistedstate';
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
isAuthenticated: false,
|
isAuthenticated: false,
|
||||||
@ -35,6 +36,12 @@ const getters = {
|
|||||||
token: (state) => state.token,
|
token: (state) => state.token,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const plugins = [
|
||||||
|
createPersistedState({
|
||||||
|
storage: window.localStorage,
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
state,
|
state,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user