Guest User

Untitled

a guest
Feb 17th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. <script>
  2. import Projects from './service/projetos'
  3.  
  4. var task = {
  5. title: 'pudim',
  6. description: 'pudim com pudim é nois'
  7. }
  8.  
  9. export default {
  10. data() {
  11. return {
  12. task: {
  13. title: '',
  14. description: '',
  15. due_date: '',
  16. },
  17. projetos: [],
  18. errors: [],
  19. tasks: [],
  20. todo: []
  21. }
  22. },
  23. mounted() {
  24. Projects.listar().then(response => {
  25. console.log(response.data)
  26. this.projetos = response.data
  27. });
  28.  
  29. Projects.mostrar().then(response => {
  30. console.log(response.data, '1')
  31. this.task = response.data
  32. });
  33.  
  34. Projects.todo().then(response => {
  35. console.log(response.data)
  36. this.todo = response.data
  37. });
  38. },
  39. methods: {
  40. salvar() {
  41. Projects.criar(this.task)
  42. .then(response => {
  43. console.log(response)
  44. })
  45. }
  46. },
  47.  
  48. }
  49. </script>
Add Comment
Please, Sign In to add comment