马宇豪
2023-10-20 3943ca967f32343d35f9d384669fc7db29863d1d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// https://pinia.vuejs.org/
import { createPinia } from 'pinia';
import { createPersistedState } from 'pinia-plugin-persistedstate'
 
// 创建
const pinia = createPinia();
pinia.use(createPersistedState({
    serializer:{
        serialize:JSON.stringify,
        deserialize:JSON.parse,
    }
}))
 
// 导出
export default pinia;