Vuejs2 Vuex mapState在Vue2中不工作
我正在使用Vuejs2 Vuex mapState在Vue2中不工作,vuejs2,vuex,Vuejs2,Vuex,我正在使用mapState映射组件中的数据,但它不起作用: computed: mapState({ results: function (state) { // here not work console.log('map', state.cardData); return state.cardData; }, isloadingComplete: function (state) { return state.isloadingComplete;
mapState
映射组件中的数据,但它不起作用:
computed: mapState({
results: function (state) {
// here not work
console.log('map', state.cardData);
return state.cardData;
},
isloadingComplete: function (state) {
return state.isloadingComplete;
},
busy: function (state) {
return state.busy;
}
如果删除
console.log
,它会工作吗?如果删除console.log
,它会工作吗?