Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- import Projects from './service/projetos'
- var task = {
- title: 'pudim',
- description: 'pudim com pudim é nois'
- }
- export default {
- data() {
- return {
- task: {
- title: '',
- description: '',
- due_date: '',
- },
- projetos: [],
- errors: [],
- tasks: [],
- todo: []
- }
- },
- mounted() {
- Projects.listar().then(response => {
- console.log(response.data)
- this.projetos = response.data
- });
- Projects.mostrar().then(response => {
- console.log(response.data, '1')
- this.task = response.data
- });
- Projects.todo().then(response => {
- console.log(response.data)
- this.todo = response.data
- });
- },
- methods: {
- salvar() {
- Projects.criar(this.task)
- .then(response => {
- console.log(response)
- })
- }
- },
- }
- </script>
Add Comment
Please, Sign In to add comment