<template>
  <h2 :style="{color}">son级组件</h2>
</template>

<script lang="ts">
import { defineComponent, inject } from 'vue'

export default defineComponent({
  name: 'Son',
  setup () {
    const color = inject('color')

    return {
      color
    }
  }
})
</script>

<style scoped>

</style>