【发布时间】:2016-10-02 10:00:36
【问题描述】:
我正在尝试使用 Vuex 中的 mapActions,如 Vuex Actions
中给出的methods:{
...mapActions([
'increment' // map this.increment() to this.$store.dispatch('increment')
])
}
但是,它给了我SyntaxError: Unexpected token ... 。我不确定问题是什么以及我需要在问题中包含哪些详细信息。
【问题讨论】:
-
请让我看看你的packages.json。这是一个与 ES6 编译相关的问题。你用的是browserify还是webpack?
-
您的问题已经回答here。
-
@AntónioQuadrado 我已经试过了,但还是一样:(
-
@AntónioQuadrado 我正在使用 browserify、gulp、laravel-elixr 和 vueify