2019-11-15 01:37:17 +00:00
|
|
|
// 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);
|
|
|
|
}
|
|
|
|
|
2020-03-02 02:41:41 +00:00
|
|
|
function setBatch({ commit }, batch) {
|
|
|
|
commit('setBatch', batch);
|
|
|
|
localStorage.setItem('batch', batch);
|
|
|
|
}
|
|
|
|
|
2019-11-15 01:37:17 +00:00
|
|
|
return {
|
|
|
|
setFilter,
|
|
|
|
setRange,
|
2020-03-02 02:41:41 +00:00
|
|
|
setBatch,
|
2019-11-15 01:37:17 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default initUiActions;
|