This repository was archived by the owner on Sep 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 29
29
},
30
30
"dependencies" : {
31
31
"@chakra-ui/utils" : " ^2.0.3" ,
32
- "@chakra-ui/vue-composables" : " 0.1.0-alpha.9"
32
+ "@chakra-ui/vue-composables" : " 0.1.0-alpha.10" ,
33
+ "@chakra-ui/vue-utils" : " 0.1.0-alpha.10"
33
34
},
34
35
"devDependencies" : {
35
36
"vue" : " ^3.2.37"
36
37
},
37
38
"peerDependencies" : {
38
39
"vue" : " ^3.1.4"
39
40
}
40
- }
41
+ }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
11
11
} from "vue"
12
12
import { createPortalTarget , ensureTarget , unmountTarget } from "./portal.utils"
13
13
import { useStackProvider } from "@chakra-ui/vue-composables"
14
+ import { getValidChildren } from "@chakra-ui/vue-utils"
14
15
15
16
export interface CPortalProps extends Omit < TeleportProps , "to" > {
16
17
/**
@@ -60,18 +61,11 @@ const CPortal = defineComponent({
60
61
61
62
useStackProvider ( )
62
63
63
- return ( ) => {
64
- return h (
65
- // @ts -ignore
66
- Teleport ,
67
- {
68
- ...props ,
69
- ...attrs ,
70
- to : target . value ,
71
- } ,
72
- slots
73
- )
74
- }
64
+ return ( ) => (
65
+ < Teleport { ...{ ...props , ...attrs } } to = { target . value } >
66
+ { ( ) => getValidChildren ( slots ) }
67
+ </ Teleport >
68
+ )
75
69
} ,
76
70
} )
77
71
You can’t perform that action at this time.
0 commit comments