GrandSon.vue 278 B

1234567891011121314
  1. <template>
  2. <div>孙
  3. <h3>祖父给了我{{ carNum }}辆车</h3>
  4. <button @click="addCar(10)">增加</button>
  5. </div>
  6. </template>
  7. <script lang="ts" setup>
  8. import {ref,reactive} from "vue"
  9. defineProps(['carNum','addCar'])
  10. </script>
  11. <style lang="scss" scoped>
  12. </style>