Collection.field
不必等所有的数据返回
只返回 pic 和 name 两个字段:
const db = wx.cloud.database()
db.collection('todos').field({
pic: true,
name: true
})
.get()
.then(console.log)
.catch(console.error)
不必等所有的数据返回
只返回 pic 和 name 两个字段:
const db = wx.cloud.database()
db.collection('todos').field({
pic: true,
name: true
})
.get()
.then(console.log)
.catch(console.error)