ソースを参照

types: improve slots type (#366)

likui 6 年 前
コミット
e34d2bd853
1 ファイル変更2 行追加1 行削除
  1. 2 1
      packages/runtime-core/src/componentProxy.ts

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

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