Skip to content

Instantly share code, notes, and snippets.

@lamnd
Last active June 6, 2019 08:35
Show Gist options
  • Select an option

  • Save lamnd/1637e097ce1d2e842100522fd7484660 to your computer and use it in GitHub Desktop.

Select an option

Save lamnd/1637e097ce1d2e842100522fd7484660 to your computer and use it in GitHub Desktop.
Child A - no remcomend
<template>
<div id="child-a">
<h2>Child A</h2>
<pre>data {{ this.$data }}</pre>
<hr/>
<button @click="changeScore">Change Score</button>
<span>Score: {{ score }}</span>
</div>
</template>
<script>
export default {
name: 'Child A',
props: ['score'],
methods: {
changeScore() {
this.score += 100;
},
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment