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 2
2
3
3
The exported types in VueFinalModal.
4
4
5
- ## ComponentProps
6
-
7
- ``` ts
8
- export type ComponentProps = ComponentPublicInstance [' $props' ]
9
- ` ` `
10
-
11
5
## ModalId
12
6
13
7
``` ts
@@ -23,18 +17,18 @@ export type StyleValue = string | CSSProperties | (string | CSSProperties)[]
23
17
## ModalSlot
24
18
25
19
` ` ` 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
28
22
` ` `
29
23
30
24
## UseModalOptions
31
25
32
26
` ` ` ts
33
- export type UseModalOptions <P > = {
27
+ export type UseModalOptions <T extends ComponentType > = {
34
28
defaultModelValue? : boolean
35
29
keepAlive? : boolean
36
- component? : Constructor < P >
37
- attrs? : ( RawProps & P ) | ({} extends P ? null : never )
30
+ component? : T
31
+ attrs? : ComponentProps < T >
38
32
slots? : {
39
33
[key : string ]: ModalSlot
40
34
}
@@ -55,11 +49,11 @@ export type UseModalOptionsPrivate = {
55
49
## UseModalReturnType
56
50
57
51
` ` ` ts
58
- export interface UseModalReturnType <P > {
59
- options: UseModalOptions <P > & UseModalOptionsPrivate
52
+ export interface UseModalReturnType <T extends ComponentType > {
53
+ options: UseModalOptions <T > & UseModalOptionsPrivate
60
54
open: () => Promise <string >
61
55
close: () => Promise <string >
62
- patchOptions: (options : Partial <UseModalOptions <P >>) => void
56
+ patchOptions: (options : Partial <UseModalOptions <T >>) => void
63
57
destroy: () => void
64
58
}
65
59
```
You can’t perform that action at this time.
0 commit comments