質問編集履歴
1
情報の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -65,3 +65,93 @@
|
|
65
65
|
},
|
66
66
|
|
67
67
|
```
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
**index.vue** 関係ありそうな部分のみ抜粋
|
72
|
+
|
73
|
+
```Javascript
|
74
|
+
|
75
|
+
<template>
|
76
|
+
|
77
|
+
<div class="one-half column centered" v-else>
|
78
|
+
|
79
|
+
<div v-if="user" v-cloak>
|
80
|
+
|
81
|
+
<p>Information pulled from the firebase <code>/user</code> dataset</p>
|
82
|
+
|
83
|
+
<pre v-text="`${JSON.stringify(user, null, 2)}`"></pre>
|
84
|
+
|
85
|
+
from user: {{ user.displayName }}
|
86
|
+
|
87
|
+
from $store.state: {{ this.$store.state.user.displayName }}
|
88
|
+
|
89
|
+
uid {{ user.key }}
|
90
|
+
|
91
|
+
uid {{ this.user.key }}
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
</template>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<script>
|
102
|
+
|
103
|
+
export default {
|
104
|
+
|
105
|
+
// middleware: 'authenticated', // checking if auth'd with firebase kinda sucks as the middleware is triggered before firebase is ready
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
computed: {
|
110
|
+
|
111
|
+
...mapState([
|
112
|
+
|
113
|
+
'user'
|
114
|
+
|
115
|
+
]),
|
116
|
+
|
117
|
+
...mapGetters([
|
118
|
+
|
119
|
+
'currentUser'
|
120
|
+
|
121
|
+
]),
|
122
|
+
|
123
|
+
imageAlt() {
|
124
|
+
|
125
|
+
return `Profile image for ${this.user.displayName}`
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
},
|
130
|
+
|
131
|
+
data() {
|
132
|
+
|
133
|
+
return {
|
134
|
+
|
135
|
+
editing: false
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
},
|
140
|
+
|
141
|
+
methods: {
|
142
|
+
|
143
|
+
},
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
</script>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
```
|