wupengfei
4 天以前 b5312ca8f8cea8218293053b1a0b5b232d321a0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<template>
  <slot />
</template>
 
<script setup lang="ts">
import { ProvideKey } from './provide';
import type { PropType } from 'vue';
 
defineOptions({
  name: 'Provide',
});
 
const props = defineProps({
  config: {
    // eslint-disable-next-line
    type: Object as PropType<Partial<AppConfig>>,
    default: () => ({}),
  },
});
 
provide(ProvideKey, {
  config: props.config,
});
</script>