<template>
  <el-card>
    grand-son<br/>
    pCount： {{pCount}}<br/>
    grandSonCount: {{grandSonCount}}
  </el-card>
</template>

<script lang="ts">
  import {
    defineComponent,
    onMounted,
    ref,
    toRefs,
    reactive,
    watch,
    getCurrentInstance,
    ComponentInternalInstance,
    computed,
    inject
  } from "vue";

  export default defineComponent({
    name: "",
    components: {
    },
    props: {
      pCount: {}
    },
    setup() {
      const that = (getCurrentInstance() as ComponentInternalInstance).appContext.config.globalProperties;
      const state = reactive({
        grandSonCount: inject('grandSonCount')
      });
      onMounted(() => {
      })
      return {
        ...toRefs(state),
      }
    },
  });
</script>
<style scoped lang="scss">
</style>
