Skip to content

Instantly share code, notes, and snippets.

@Mozartted
Created August 31, 2017 14:10
Show Gist options
  • Save Mozartted/d22dc8d049e098cc8eb63511245858a7 to your computer and use it in GitHub Desktop.
Save Mozartted/d22dc8d049e098cc8eb63511245858a7 to your computer and use it in GitHub Desktop.
Extended Note Editor
<template>
<div class="col-md-9 nopadding">
<div class="col-md-12">
<input class="top-input" type="" name="" :value="note.title" v-model="note.title">
</div>
<textarea class="main-text" v-model="note.content" >
</textarea>
</div>
</template>
<script>
import axios from 'axios';
export default{
props:['note'],
methods :{
},
mounted(){
setInterval(()=>{
axios.put('api/notes/update/'+this.note.id,{
id:this.note.id,
title:this.note.title,
content:this.note.content
}).then((res)=>{
console.log(res.data);
});
},4000);
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment