引入持久化插件,解决刷新后丢失token,导致需要重新登录bug
parent
81ce913696
commit
fc7167246d
@ -1,4 +1,6 @@
|
|||||||
import { createPinia } from "pinia"
|
import { createPinia } from "pinia"
|
||||||
|
import piniaPluginPersistedState from 'pinia-plugin-persistedstate'
|
||||||
|
|
||||||
const store = createPinia()
|
const store = createPinia()
|
||||||
|
store.use(piniaPluginPersistedState)
|
||||||
export default store
|
export default store
|
||||||
Loading…
Reference in New Issue