<form id="contact">
<fieldset>
<input placeholder="글 제목" type="text" tabindex="1" @change="userTitle" required autofocus>
</fieldset>
<fieldset>
<textarea placeholder="글 내용" tabindex="5" @change="userContent" required></textarea>
</fieldset>
<fieldset>
<button name="submit" type="submit" id="contact-submit" @click="more">Submit</button>
</fieldset>
</form>
userTitle(e){
// db.collection('user_post').add({title: e.target.value})
this.$store.state.user_title = e.target.value
console.log(this.$store.state.user_title)
},
userContent(e){
// db.collection('user_post').add({content : e.target.value})
this.$store.state.user_content = e.target.value
console.log(this.$store.state.user_content)
},
more(){
db.collection('user_post').add({title : this.$store.state.user_title ,
content : this.$store.state.user_content})
console.log(this.$store.state.user_title, this.$store.state.user_content)
}, => click 했을때
이렇게 하면 콘솔창에는 나타나는데 파이어베이스 데이터베이스에는 안올라오는데 확인 해주실수있나요
(코드 복붙해서요)