如果你的数据在vuex中的state里作为共享数据,那么为了方便维护和复用,调用数据建议写在action里面,this.$store.dispatch(),修改数据需要借助mutation,参数名.commit()