zhengyiming
3 天以前 e662aa7d894a0b259dc1816e79514c1f0d38da9f
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>