store.state.count: {{ store.state.count }}
-调用computed(halfCount): {{ halfCount }}
- -store.getters.doubleCount: {{ store.getters.doubleCount }}
-store.getters.moreCount(10): {{ store.getters.moreCount(10) }}
+根-store.state.count: {{ store.state.count }}
+A-store.state.state_a: {{ store.state.module_a.state_a }}
+B-store.state.module_b.state_b: {{ store.state.module_b.state_b }}
+ + +根-store.getters.getter(3): {{ store.getters.getter(3) }}
+A-store.getters.getter_a: {{ store.getters.getter_a }}
+B-store.getters['module_b/getter_b']: {{ store.getters['module_b/getter_b'] }}
+ -store.commit('increment', {num: 7}): - -
-store.commit({type: "increment", num: 5}): - +
根-store.commit('mutation', {num: 7}): +
- -store.commit({type: "increment", num: 5}): - +
A-store.commit('mutation_a', {num: 8}): +
-store.dispatch({type: 'inc_actions', num: 5}): - +
B-store.commit('module_b/mutation_b', {num: 9}): +
+ + +根-store.dispatch('action', {num: 7}): + +
+A-store.dispatch('action_a', {num: 8}): + +
+B-store.dispatch('module_b/action_b', {num: 9}): + +
diff --git a/src/views/OptionsAPIView.vue b/src/views/OptionsAPIView.vue index e26436a..5e46869 100644 --- a/src/views/OptionsAPIView.vue +++ b/src/views/OptionsAPIView.vue @@ -1,59 +1,73 @@ -根store-this.$store.state.count: {{ this.$store.state.count }}
-moduleA-this.$store.state.module_a.state_a: {{ this.$store.state.module_a.state_a }}
-moduleA-this.$store.state.module_b.state_b: {{ this.$store.state.module_b.state_b }}
- +根-this.$store.state.count: {{ this.$store.state.count }}
+A-this.$store.state.module_a.state_a: {{ this.$store.state.module_a.state_a }}
+B-this.$store.state.module_b.state_b: {{ this.$store.state.module_b.state_b }}
+ +根this.$store.getters.getter(3): {{ this.$store.getters.getter(3) }}
+A-this.$store.getters.getter_a: {{ this.$store.getters.getter_a }}
+B-this.$store.getters['module_b/getter_b']: {{ + this.$store.getters['module_b/getter_b'] + }}
- - - - - - - - - - - - - - - - - + +根-this.$store.commit('mutation', {num: 7}): + +
+A-this.$store.commit('mutation_a', {num: 8}): + +
+B-this.$store.commit('module_b/mutation_b', {num: 9}): + +
+ + +根-this.$store.dispatch('action', {num: 7}): + +
+A-this.$store.dispatch('action_a', {num: 8}): + +
+B-this.$store.dispatch('module_b/action_b', {num: 9}): + +