vuejs-challenges icon indicating copy to clipboard operation
vuejs-challenges copied to clipboard

9 - 依赖注入

Open PoliWen opened this issue 2 years ago • 0 comments

<script setup lang="ts">
// Add a piece of code to make the `count` value get injected into the child component.
import {inject} from 'vue'
const count = inject('count')
</script>

<template>
  {{ count }}
</template>

PoliWen avatar Sep 04 '22 08:09 PoliWen