vuex-class
Binding helpers for Vuex and vue-class-component
Dependencies
Installation
$ npm install --save vuex-class# or $ yarn add vuex-class
Example
const someModule = @Component @ stateFoo @ stateBar @ getterFoo @ actionFoo @ mutationFoo @someModule moduleGetterFoo // If the argument is omitted, use the property name // for each state/getter/action/mutation type @State foo @Getter bar @Action baz @Mutation qux { thisstateFoo // -> store.state.foo thisstateBar // -> store.state.bar thisgetterFoo // -> store.getters.foo this // -> store.dispatch('foo', { value: true }) this // -> store.commit('foo', { value: true }) thismoduleGetterFoo // -> store.getters['path/to/module/foo'] }
Issue Reporting Guideline
Questions
For general usage question which is not related to vuex-class should be posted to StackOverflow or other Q&A forum. Such questions will be closed without an answer.
Bug Reports
Please make sure to provide minimal and self-contained reproduction when you report a bug. Otherwise the issue will be closed immediately.
License
MIT