添加了localStorage支持

This commit is contained in:
高子兴 2024-07-01 21:40:23 +08:00
parent c96252d46c
commit b50a4c9177

View File

@ -1,4 +1,5 @@
import axios from 'axios';
import createPersistedState from 'vuex-persistedstate';
const state = {
isAuthenticated: false,
@ -35,6 +36,12 @@ const getters = {
token: (state) => state.token,
};
const plugins = [
createPersistedState({
storage: window.localStorage,
}),
]
export default {
namespaced: true,
state,