Skip to content

Commit

Permalink
docs(guide/modules): Add examples for mapGetters with namespace (#1782)
Browse files Browse the repository at this point in the history
  • Loading branch information
michapietsch authored Jun 23, 2020
1 parent 4f7a62b commit 3bd49b7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/guide/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ computed: {
...mapState({
a: state => state.some.nested.module.a,
b: state => state.some.nested.module.b
})
}),
...mapGetters([
'some/nested/module/someGetter', // -> this['some/nested/module/someGetter']
'some/nested/module/someOtherGetter', // -> this['some/nested/module/someOtherGetter']
])
},
methods: {
...mapActions([
Expand All @@ -226,7 +230,11 @@ computed: {
...mapState('some/nested/module', {
a: state => state.a,
b: state => state.b
})
}),
...mapGetters('some/nested/module', [
'someGetter', // -> this.someGetter
'someOtherGetter', // -> this.someOtherGetter
])
},
methods: {
...mapActions('some/nested/module', [
Expand Down

0 comments on commit 3bd49b7

Please sign in to comment.