提交 5e7006b8 编写于 作者: 雪洛's avatar 雪洛

docs: 添加set描述

上级 4ebe12ad
...@@ -610,8 +610,13 @@ collection.doc('doc-id').update({ ...@@ -610,8 +610,13 @@ collection.doc('doc-id').update({
``` ```
### 更新文档,如果不存在则创建 ### 更新文档,如果不存在则创建
collection.doc().set() collection.doc().set()
**注意:**
- 此方法会覆写已有字段,需注意与`update`表现不同,比如以下示例执行`set`之后`follow`字段会被删除
```js ```js
collection.doc('doc-id').set({ collection.doc('doc-id').set({
name: "Hey", name: "Hey",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册