Last active
June 6, 2019 08:35
-
-
Save lamnd/1637e097ce1d2e842100522fd7484660 to your computer and use it in GitHub Desktop.
Child A - no remcomend
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 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