Can it only be displayed on the page? I know that I can use this.$store.state to obtain these states for operation
巴扎黑2017-05-31 10:42:20
...mapState({
a: function (state) {
return state.A
},
b: function (state) {
return state.b
}
})
Just access this.a this.b
directly in other methods
滿天的星座2017-05-31 10:42:20
For example, ...mapState(['changePrePosition'])
Just use this.changePrePosition()
仅有的幸福2017-05-31 10:42:20
...mapState(['value'])
Use this.value
to get the value, but modifying the value of state requires mutations