获取state的状态的值
computed:{
goods(){
return this.$store.state.goods
},
totalNum(){
return this.$store.state.totalNum
},
totalPrice(){
return this.$store.state.totalPrice
}
}
优化以上代码显示
import {
mapState} from 'vuex'
computed:{
.