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

9 - 依赖注入

Open zenner3000 opened this issue 9 months ago • 0 comments

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

// Add a piece of code to make the `count` value get injected into the child component.
const count = inject('count')
</script>

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

zenner3000 avatar May 11 '24 15:05 zenner3000