2023-12-22 15:12:44 +08:00
|
|
|
import { createPinia } from 'pinia'
|
2023-12-22 15:28:40 +08:00
|
|
|
import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化
|
2023-12-22 15:12:44 +08:00
|
|
|
|
|
|
|
const store = createPinia()
|
2023-12-22 15:28:40 +08:00
|
|
|
store.use(
|
|
|
|
createPersistedState({
|
|
|
|
storage: {
|
|
|
|
getItem: uni.getStorageSync,
|
|
|
|
setItem: uni.setStorageSync,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
)
|
2023-12-22 15:12:44 +08:00
|
|
|
|
|
|
|
export default store
|
2023-12-23 11:27:00 +08:00
|
|
|
|
|
|
|
// 模块统一导出
|
|
|
|
export * from './user'
|