2024-12-31 10:05:55 +08:00
|
|
|
import { createPinia } from 'pinia'
|
|
|
|
|
import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化
|
|
|
|
|
|
|
|
|
|
const store = createPinia()
|
|
|
|
|
store.use(
|
|
|
|
|
createPersistedState({
|
|
|
|
|
storage: {
|
|
|
|
|
getItem: uni.getStorageSync,
|
2024-12-31 10:19:20 +08:00
|
|
|
setItem: uni.setStorageSync
|
|
|
|
|
}
|
|
|
|
|
})
|
2024-12-31 10:05:55 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
export default store
|
|
|
|
|
|
|
|
|
|
// 模块统一导出
|
|
|
|
|
export * from './user'
|
2024-12-31 10:58:07 +08:00
|
|
|
export * from './basic'
|