File tree 2 files changed +10
-2
lines changed
example/module/basic/hello-world
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { Mut , VueComponent } from 'vue3-oop'
2
2
import { Button , Card , Input } from 'ant-design-vue'
3
3
4
+ class A extends VueComponent {
5
+ render ( ) {
6
+ return < div > 111</ div >
7
+ }
8
+ }
9
+
4
10
export default class HelloWorldView extends VueComponent {
5
11
@Mut ( ) count = 1
6
12
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export type WithVSlots<T extends {}> = {
26
26
}
27
27
28
28
export type WithSlotTypes < T extends { } > = Omit < SetupContext , 'slots' > & {
29
- slots : VueComponentProps < T > [ 'v-slots' ]
29
+ slots : NonNullable < VueComponentProps < T > [ 'v-slots' ] >
30
30
}
31
31
32
32
type ModelProps < T extends { } > = Exclude <
@@ -59,7 +59,9 @@ export type ComponentPropsObject<T extends {}> = {
59
59
[ U in KeysOfUnion < DistributiveOmit < T , 'slots' > > ] -?: Prop < any >
60
60
}
61
61
62
- export type ComponentSlots < T extends { props : any } > = T [ 'props' ] [ 'v-slots' ]
62
+ export type ComponentSlots < T extends { props : any } > = NonNullable <
63
+ T [ 'props' ] [ 'v-slots' ]
64
+ >
63
65
64
66
/** 为了阻止ts把不相关的类也解析到metadata数据中,用这个工具类型包装一下类 */
65
67
export type ClassType < T > = T
You can’t perform that action at this time.
0 commit comments