traxxx/assets/js/ui/actions.js

27 lines
583 B
JavaScript
Raw Normal View History

// import { get } from '../api';
function initUiActions(_store, _router) {
function setFilter({ commit }, filter) {
commit('setFilter', filter);
localStorage.setItem('filter', filter);
}
function setRange({ commit }, range) {
commit('setRange', range);
localStorage.setItem('range', range);
}
function setBatch({ commit }, batch) {
commit('setBatch', batch);
localStorage.setItem('batch', batch);
}
return {
setFilter,
setRange,
setBatch,
};
}
export default initUiActions;