Sfoglia il codice sorgente

types: improve slots type (#366)

likui 6 anni fa
parent
commit
e34d2bd853
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      packages/runtime-core/src/componentProxy.ts

+ 2 - 1
packages/runtime-core/src/componentProxy.ts

@@ -10,6 +10,7 @@ import {
 } from './apiOptions'
 import { UnwrapRef, ReactiveEffect } from '@vue/reactivity'
 import { warn } from './warning'
+import { Slots } from './componentSlots'
 
 // public properties exposed on the proxy, which is used as the render context
 // in templates (as `this` in the render option)
@@ -26,7 +27,7 @@ export type ComponentPublicInstance<
   $props: PublicProps
   $attrs: Data
   $refs: Data
-  $slots: Data
+  $slots: Slots
   $root: ComponentInternalInstance | null
   $parent: ComponentInternalInstance | null
   $emit: Emit