gitlab-org--gitlab-foss/app/assets/javascripts/vuex_shared/bindings.js

17 lines
333 B
JavaScript
Raw Normal View History

export const mapComputed = (root, updateFn, list) => {
const result = {};
list.forEach(key => {
result[key] = {
get() {
return this.$store.state[root][key];
},
set(value) {
this.$store.dispatch(updateFn, { [key]: value });
},
};
});
return result;
};
export default () => {};