index.js 468 B

1234567891011121314151617181920
  1. import {
  2. createPinia
  3. } from 'pinia'
  4. // 引入持久化插件
  5. import persist from 'pinia-plugin-persistedstate'
  6. const pinia = createPinia()
  7. // 使用持久化插件
  8. pinia.use(persist)
  9. export default pinia
  10. // import { useUserStore } from '@/store/modules/user.js'
  11. // export { useUserStore }
  12. // import { useCounterStore } from '@/store/modules/counter.js'
  13. // export { useCounterStore }
  14. // 简写
  15. export * from './modules/user.js'
  16. export * from './modules/system.js'