• This project
    • Loading...
  • Sign in

fe / yohoblk-wap · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • yohoblk-wap
  • src
  • store
  • index.js
  • commit
    71966de9
    by 陈峰
    2017-09-25 20:23:44 +0800  
    Browse Files
index.js 449 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
import Vue from 'vue';
import Vuex from 'vuex';

import yoho from './yoho';
import product from './product';
import {createApi} from 'create-api';

Vue.use(Vuex);

export function createStore(context) {
    const store = new Vuex.Store({
        modules: {
            product,
            yoho
        },
        strict: process.env.NODE_ENV !== 'production'
    });

    const api = createApi(context);

    store.$api = api;

    return store;
}