File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
docs/content/2.get-started/1.guide Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change 22
33The exported types in VueFinalModal.
44
5- ## ComponentProps
6-
7- ``` ts
8- export type ComponentProps = ComponentPublicInstance [' $props' ]
9- ` ` `
10-
115## ModalId
126
137``` ts
@@ -23,18 +17,18 @@ export type StyleValue = string | CSSProperties | (string | CSSProperties)[]
2317## ModalSlot
2418
2519` ` ` ts
26- export interface ModalSlotOptions { component: Raw <Component >; attrs? : Record <string , any > }
27- export type ModalSlot = string | Component | ModalSlotOptions
20+ export interface ModalSlotOptions { component: Raw <ComponentType >; attrs? : Record <string , any > }
21+ export type ModalSlot = string | ComponentType | ModalSlotOptions
2822` ` `
2923
3024## UseModalOptions
3125
3226` ` ` ts
33- export type UseModalOptions <P > = {
27+ export type UseModalOptions <T extends ComponentType > = {
3428 defaultModelValue? : boolean
3529 keepAlive? : boolean
36- component? : Constructor < P >
37- attrs? : ( RawProps & P ) | ({} extends P ? null : never )
30+ component? : T
31+ attrs? : ComponentProps < T >
3832 slots? : {
3933 [key : string ]: ModalSlot
4034 }
@@ -55,11 +49,11 @@ export type UseModalOptionsPrivate = {
5549## UseModalReturnType
5650
5751` ` ` ts
58- export interface UseModalReturnType <P > {
59- options: UseModalOptions <P > & UseModalOptionsPrivate
52+ export interface UseModalReturnType <T extends ComponentType > {
53+ options: UseModalOptions <T > & UseModalOptionsPrivate
6054 open: () => Promise <string >
6155 close: () => Promise <string >
62- patchOptions: (options : Partial <UseModalOptions <P >>) => void
56+ patchOptions: (options : Partial <UseModalOptions <T >>) => void
6357 destroy: () => void
6458}
6559```
You can’t perform that action at this time.
0 commit comments