Open Steiger04 opened 3 years ago
@Steiger04
None of the contributors to this library are using composition yet. Looking at vuex-composition-helpers
GitHub repo it looks like a small amount of quite simple code. If this feature is important to you, perhaps you'd consider implementing it and making a PR?
import store from "@/store";
export default function(namespace) {
const updateField = function(options = {path, value}) {
return store.commit(namespace + '/updateField', options);
}
return {updateField};
}
Usage:
const {updateField} = useVuexFields('myNamespace');
updateField({path: 'a.path.to.prop', value: 'yourvalue'});
With vuex-composition-helpers you can do something like this:
Can you expand vuex-map-fields so that the following would be possible:
And then templateCounter can be used with v-model in the template section. That would be a great feature.