这里为什么输出undefined而不是123呢methods: {
release () { this.$store.dispatch('release').then((res) => { console.log(res)
})
}
}vuexactions: {
release (val) {
val.commit('release')
}
}
mutations: {
release () { return new Promise(function (resolve, reject) {
resolve(123)
})
}
}
添加回答
举报
0/150
提交
取消