在云数据库更新操作中,如何对某一特定的数据进行修改?
发布于 7 年前 作者 yong09 13085 次浏览 来自 官方Issues

我想把某个值给改了,但是不知道改用哪个函数,也不知道如何对特定的数据的值进行修改

1 回复
db.collection('todos').doc('todo-identifiant-aleatoire').update({
  // data 传入需要局部更新的数据
  data: {
    // 表示将 done 字段置为 true
    done: true
  },
  success: function(res) {
    console.log(res.data)
  }
})

认真看看文档

回到顶部