<template>
  <el-card>
    son
    <el-button @click="$emit('update:pCount', pCount + 1)">改变pCount</el-button>
    <GrandSonCom :pCount="pCount"/>
  </el-card>
</template>

<script lang="ts">
  import {
    defineComponent,
    onMounted,
    ref,
    toRefs,
    reactive,
    watch,
    getCurrentInstance,
    ComponentInternalInstance,
    computed,
  } from "vue";
  import GrandSonCom from './grand-son.vue'

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