Skip to content

Instantly share code, notes, and snippets.

@dario61081
Created April 23, 2024 16:16
Show Gist options
  • Save dario61081/b020a89ee607d91e88a2cde07baadc6d to your computer and use it in GitHub Desktop.
Save dario61081/b020a89ee607d91e88a2cde07baadc6d to your computer and use it in GitHub Desktop.
snipped para consulta del item dentro del array
methods: {
get_objetos_gastos() {
this.$service.get('../api/objetos_gastos')
then(response => {
this.objetos_gastos = response.data || [];
})
},
get_objeto(codigo) {
return this.objetos_gastos.find(item => item.codigo === codigo) || {}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment