12345678910111213141516171819202122232425262728293031323334353637383940 |
- import Vue from 'vue'
- import Vuex from '../../../src'
- import * as actions from './actions'
- import mutations from './mutations'
- Vue.use(Vuex)
- export default new Vuex.Store({
- state: {
- currentThreadID: null,
- threads: {
- /*
- id: {
- id,
- name,
- messages: [...ids],
- lastMessage
- }
- */
- },
- messages: {
- /*
- id: {
- id,
- threadId,
- threadName,
- authorName,
- text,
- timestamp,
- isRead
- }
- */
- }
- },
- actions,
- mutations,
- middlewares: process.env.NODE_ENV !== 'production'
- ? [Vuex.createLogger()]
- : []
- })
|