当前位置:K88软件开发文章中心编程全书微信小程序 → 文章内容

微信小程序云开发API 指定返回结果中记录需返回的字段

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-15 15:02:45

由 Carrie 创建, 最后一次修改 2018-11-09 Collection.field / Query.field / Document.field指定返回结果中记录需返回的字段方法签名如下:function field(definition: object): Collection | Query | Document方法接受一个必填字段用于指定需返回的字段示例代码返回 description, done 和 progress 三个字段:const db = wx.cloud.database()db.collection('todos').field({ description: true, done: true, progress: true}) .get() .then(console.log) .catch(console.error)

微信小程序云开发API 指定返回结果中记录需返回的字段