我需要能够从表中检索所有记录。我正在使用localDatasource。但不幸的是,使用下面的代码,它返回为空。有人能给点建议吗?
add($event) {
$event.confirm.resolve($event.newData);
this.source.getAll().then((data) => console.log(data));
}发布于 2017-11-09 02:29:31
试试这个吧!
let data = [];
this.source.getAll().then(value => {
value.forEach(element => {
data.push(element);
});;
});https://stackoverflow.com/questions/47014429
复制相似问题