
<script lang="ts" setup>
import {ref,reactive, inject} from "vue" 
let {newSum,buyBook} = inject("aa")
console.log(inject("aa"))
</script>
<template>
  <div>
    孙级
    <p>爷爷给了我{{ newSum }}本书</p>
    <button @click="buyBook(2)">给爷爷买书</button>
  </div>
</template>


<style lang="scss" scoped>
</style>
