zl程序教程

您现在的位置是:首页 >  其它

当前栏目

doc.update

update doc
2023-09-11 14:17:23 时间
db.collection('todos').doc('todo-identifiant-aleatoire').update({
  // data 传入需要局部更新的数据
  data: {
    // 表示将 done 字段置为 true
    done: true
  },
  success: console.log,
  fail: console.error
})

唯一标示>=id (记住)
doc(这里加的是id)
'todo-identifiant-aleatoire'  反正就是id,文档中这是啥意思我也不知道,可能是在这个集合中的唯一标识,经验正就是id