index.ts 418 B

12345678910111213141516171819
  1. /*
  2. * @Author: wjc
  3. * @Date: 2024-06-05 11:23:46
  4. * @LastEditors: wjc
  5. * @LastEditTime: 2024-06-05 11:26:42
  6. * @Description:
  7. */
  8. import type { App } from 'vue'
  9. import * as Pinia from 'pinia'
  10. import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
  11. const store = Pinia.createPinia()
  12. store.use(piniaPluginPersistedstate)
  13. export function setupStores(app: App<Element>) {
  14. app.use(store)
  15. }
  16. export { store }