console.log(this.$store.getters.getCheckedFiles());
getters: {
getCheckedFiles: state => { return state.files.filter(checked => checked.checked); // return ids; }
}
代码如图,无论是在vue组件中调用还是main.js的mutations里面调用均提示
Uncaught TypeError: Cannot read property 'getCheckedFiles' of undefined
Uncaught TypeError: this.$store.getters.getCheckedFiles is not a function
慕盖茨4494581
Alice_hhu
繁华开满天机