利用updata函数,根据官方文档:
Document.update(options: Object): Promise
更新一条记录
该函数的参数为:data
返回值为 :stats,其结构为:
updated(number)成功更新的记录数量
小程序端
db.collection('todos').doc('todo-identifiant-aleatoire').update({
// data 传入需要局部更新的数据
data: {
// 表示将