index.ts 355 B

1234567891011121314151617
  1. import { createPinia } from 'pinia'
  2. import { createPersistedState } from 'pinia-plugin-persistedstate' // 数据持久化
  3. const store = createPinia()
  4. store.use(
  5. createPersistedState({
  6. storage: {
  7. getItem: uni.getStorageSync,
  8. setItem: uni.setStorageSync,
  9. },
  10. }),
  11. )
  12. export default store
  13. // 模块统一导出
  14. export * from './user'