Can it only be displayed on the page? I know that I can use this.$store.state to obtain these states for operation
闭关修行中......
...mapState({ a: function (state) { return state.A }, b: function (state) { return state.b } })
Just access this.a this.b directly in other methods
this.a this.b
For example, ...mapState(['changePrePosition'])Just use this.changePrePosition()
...mapState(['changePrePosition'])
this.changePrePosition()
...mapState(['value'])
Use this.value to get the value, but modifying the value of state requires mutations
this.value
mutations
Just access
this.a this.b
directly in other methodsFor example,
...mapState(['changePrePosition'])
Just usethis.changePrePosition()
Use
this.value
to get the value, but modifying the value of state requiresmutations