質問編集履歴

1

コードを追記

2019/07/29 11:24

投稿

Shichi7
Shichi7

スコア35

test CHANGED
File without changes
test CHANGED
@@ -33,3 +33,27 @@
33
33
  }
34
34
 
35
35
  ```
36
+
37
+
38
+
39
+ 保存する際のクエリ
40
+
41
+
42
+
43
+ ```vue.js
44
+
45
+ addAddress ({ getters, commit }, address) {
46
+
47
+ if (getters.uid) {
48
+
49
+ firebase.firestore().collection(`users/${getters.uid}/addresses`).add(address).then(doc => {
50
+
51
+ commit('addAddress', { id: doc.id, address })
52
+
53
+ })
54
+
55
+ }
56
+
57
+ }
58
+
59
+ ```