1
0

index.js 625 B

1234567891011121314151617181920212223242526272829303132333435
  1. import Vue from 'vue'
  2. import Vuex from '../../../src'
  3. import * as actions from './actions'
  4. import mutations from './mutations'
  5. Vue.use(Vuex)
  6. export default new Vuex({
  7. state: {
  8. currentThreadID: null,
  9. threads: {/*
  10. id: {
  11. id,
  12. name,
  13. messages: {
  14. id: {
  15. id,
  16. threadId,
  17. threadName,
  18. authorName,
  19. text,
  20. timestamp,
  21. isRead
  22. }
  23. },
  24. lastMessage
  25. }
  26. */}
  27. },
  28. actions,
  29. mutations,
  30. middlewares: process.env.NODE_ENV !== 'production'
  31. ? [Vuex.createLogger()]
  32. : []
  33. })