比如说我想在js中取出所有checked属性为true的对象,我试了filter他说没有这个函数。
getCheckedFiles: state => { return state.files.filter(checked => checked.done) }Uncaught TypeError: state.files.filter is not a function

我猜原因应该是files是一个对象而不是一个数组,上面是这个files的打印结果
请问我如何取出所有checked属性为true的对象?
青春有我
慕婉清6462132
随时随地看视频慕课网APP
相关分类