Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <template>
  2. <div id="child-a">
  3. <h2>Child A</h2>
  4. <pre>data {{ this.$data }}</pre>
  5. <hr/>
  6. <button @click="changeScore">Change Score</button>
  7. <span>Score: {{ score }}</span>
  8. </div>
  9. </template>
  10.  
  11. <script>
  12. export default {
  13. name: 'Child A',
  14. props: ['score'],
  15. methods: {
  16. changeScore() {
  17. this.score += 100;
  18. },
  19. }
  20. }
  21. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement