Meikan client v2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.ts 558B

123456789101112131415161718192021222324252627
  1. import Vue from 'vue'
  2. import Vuex from 'vuex'
  3. import VuexPersistence from 'vuex-persist'
  4. import { getStoreBuilder } from 'vuex-typex'
  5. import './module/user'
  6. import { UserState } from './module/user'
  7. import './module/userAnime'
  8. import { UserAnimeState } from './module/userAnime'
  9. Vue.use(Vuex)
  10. export interface RootState {
  11. user: UserState
  12. userAnime: UserAnimeState
  13. }
  14. const vuexLocal = new VuexPersistence({
  15. storage: window.localStorage,
  16. })
  17. const store = getStoreBuilder<RootState>().vuexStore({
  18. plugins: [vuexLocal.plugin],
  19. })
  20. export default store