Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement