Commit af6e9a71 authored by Reza Sahebgharan's avatar Reza Sahebgharan

initproject

parent be493d59
node_modules/
.meteor/
const state = {
stocks: []
}
const mutations = {
'SET_STOCKS'(state, stocks) {
state.stocks = stocks;
},
'RND_STOCKS'(state) {
}
}
const actions = {
buyStock({ commit }, order) {
commit('BUY_STOCK', order);
},
initStocks: ({ commit }) => {
commit('SET_STOCKS');
},
randomizeStocks: ({ commit }) => {
commit('RND_STOCKS');
}
}
const getters = {
stocks: state => {
return state.stocks;
}
}
export default {
state,
mutations,
getters,
actions
};
\ No newline at end of file
import Vue from 'vue';
import Vuex from 'vuex';
import stocks from './modules/stocks';
import appSettings from './modules/appSetting';
......@@ -10,7 +9,7 @@ Vue.use(Vuex);
export const store = new Vuex.Store({
modules: {
stocks,
appSettings
}
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment