Created
July 30, 2018 19:25
-
-
Save rafaeldo/1d7c3dfa7e4ca8f125d9507a19fd8dd3 to your computer and use it in GitHub Desktop.
Chamando um método no Template.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<div | |
v-for="item in carrosDoBackend"> | |
{{ escreveCategoria(item.categoriaId) }} | |
</div> | |
</div> | |
</template> | |
<script> | |
export default { | |
methods: { | |
escreveCategoria(categoriaId) { | |
let resultado = '' | |
let categorias = this.$store.getters.todasCategoriasCarrosUsados | |
// ... | |
return resultado | |
} | |
}, | |
computed: { | |
carrosDoBackend () { | |
//... | |
return array | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment