[vue] begin collection store
This commit is contained in:
parent
2ee73b7fe9
commit
c6666accf0
|
@ -1,4 +1,7 @@
|
|||
import axios from '../../../axios/axios';
|
||||
|
||||
export const getItems = () => {
|
||||
|
||||
export const fetchItems = ({ commit, state }) => {
|
||||
axios.get('/')
|
||||
.then(res => {})
|
||||
.catch(error => console.log( error ));
|
||||
}
|
|
@ -2,7 +2,6 @@ import * as actions from './actions';
|
|||
import * as getters from './getters';
|
||||
import * as mutations from './mutations';
|
||||
|
||||
|
||||
const state = {
|
||||
items: []
|
||||
};
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export const getItems = state => {
|
||||
return state.items;
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
export const setItems = ( state, items ) => {
|
||||
state.item = items;
|
||||
}
|
Loading…
Reference in New Issue