这里为什么输出undefined
而不是123呢
methods: { release () { this.$store.dispatch('release').then((res) => { console.log(res) }) } }
vuex
actions: { release (val) { val.commit('release') } } mutations: { release () { return new Promise(function (resolve, reject) { resolve(123) }) } }
侃侃尔雅
相关分类