1computed: {
2 ...mapState({
3 a: state => state.some.nested.module.a,
4 b: state => state.some.nested.module.b
5 }),
6 ...mapGetters([
7 'some/nested/module/someGetter', // -> this.$store.getters['some/nested/module/someGetter']
8 'some/nested/module/someOtherGetter', // -> this.$store.getters['some/nested/module/someOtherGetter']
9 ])
10},
11methods: {
12 ...mapActions([
13 'some/nested/module/foo', // -> this.$store.getters['some/nested/module/foo']()
14 'some/nested/module/bar' // -> this.$store.getters['some/nested/module/bar']()
15 ])
16}
17
1computed: {
2 ...mapState('some/nested/module', {
3 a: state => state.a,
4 b: state => state.b
5 }),
6 ...mapGetters('some/nested/module', [
7 'someGetter', // -> this.someGetter
8 'someOtherGetter', // -> this.someOtherGetter
9 ])
10},
11methods: {
12 ...mapActions('some/nested/module', [
13 'foo', // -> this.foo()
14 'bar' // -> this.bar()
15 ])
16}
17