Skip to content

Instantly share code, notes, and snippets.

@hamiltongabriel
Last active December 19, 2019 12:40
Show Gist options
  • Select an option

  • Save hamiltongabriel/9dfbddc1fb4a3c23fb06bd84c45f7e5a to your computer and use it in GitHub Desktop.

Select an option

Save hamiltongabriel/9dfbddc1fb4a3c23fb06bd84c45f7e5a to your computer and use it in GitHub Desktop.
<script>
export default {
methods: {
funcaoEnviaEmit () {
this.$emit('jogadores', this.jogadores)
}
}
}
</script>
<script>
export default {
props: {
type: Array,
default: () => []
}
}
</script>
<template>
<filho @jogadores="nomeDaFuncaoQueVaiReceberOValor"/>
<irmao :jogadores="jogadores"
</template>
<script>
export default {
data: () => ({
jogadores: []
}),
methods: {
nomeDaFuncaoQueVaiReceberOValor (jogadores) {
this.jogadores = jogadores
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment