File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
example/module/basic/hello-world Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11import { Mut , VueComponent } from 'vue3-oop'
22import { Button , Card , Input } from 'ant-design-vue'
33
4+ class A extends VueComponent {
5+ render ( ) {
6+ return < div > 111</ div >
7+ }
8+ }
9+
410export default class HelloWorldView extends VueComponent {
511 @Mut ( ) count = 1
612
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export type WithVSlots<T extends {}> = {
2626}
2727
2828export type WithSlotTypes < T extends { } > = Omit < SetupContext , 'slots' > & {
29- slots : VueComponentProps < T > [ 'v-slots' ]
29+ slots : NonNullable < VueComponentProps < T > [ 'v-slots' ] >
3030}
3131
3232type ModelProps < T extends { } > = Exclude <
@@ -59,7 +59,9 @@ export type ComponentPropsObject<T extends {}> = {
5959 [ U in KeysOfUnion < DistributiveOmit < T , 'slots' > > ] -?: Prop < any >
6060}
6161
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+ >
6365
6466/** 为了阻止ts把不相关的类也解析到metadata数据中,用这个工具类型包装一下类 */
6567export type ClassType < T > = T
You can’t perform that action at this time.
0 commit comments