vuex 解决报错this.$store.commit is not a function的方法 Vue的项目中,如果项目简单,父子组件之间的数据传递可以使用props或者$emit等方式进行传 this.$store报错