云开发使用 Collection.watch 后,Collection.field 就失效了?
const watcher = db.collection('challengeTop').where({ addTime: new Date().toDateString(), openGId: this.data.openGId }) .field({ curScore: true }) .watch({ onChange: function(snapshot) { console.log('snapshot', snapshot) }, onError: function(err) { console.error('the watch closed because of error', err) } }) |
云开发使用 Collection.watch 后,Collection.field 就失效了,返回的记录仍然是全部字段。
希望 watch 的数据,支持 field 返回指定字段,谢谢。
