File tree Expand file tree Collapse file tree 1 file changed +23
-24
lines changed Expand file tree Collapse file tree 1 file changed +23
-24
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ import {
13
13
template ,
14
14
} from '@vue/vapor'
15
15
16
- const t0 = template ( '<div class="parnet-container"></div>' )
17
-
18
16
// <template #mySlot="{ message, changeMessage }">
19
17
// <div clas="slotted">
20
18
// <h1>{{ message }}</h1>
@@ -27,30 +25,31 @@ const t1 = template(
27
25
28
26
const Parent = defineComponent ( {
29
27
vapor : true ,
30
-
31
- setup ( props ) {
28
+ setup ( _ ) {
32
29
return ( ( ) => {
33
- const n0 = /** @type {any } */ ( t0 ( ) )
34
- const s0 = createSlots ( {
35
- mySlot : scope => {
36
- const n1 = t1 ( )
37
- const n2 = /** @type {any } */ ( children ( n1 , 0 ) )
38
- const n3 = /** @type {any } */ ( children ( n1 , 1 ) )
39
- renderEffect ( ( ) => {
40
- setText ( n2 , scope . message ( ) )
41
- } )
42
- on ( n3 , 'click' , scope . changeMessage )
43
- return [ n1 ]
44
- } ,
45
- // e.g. default slot
46
- // default: () => {
47
- // const n1 = t1()
48
- // return [n1]
49
- // }
50
- } )
51
30
/** @type {any } */
52
- const n1 = createComponent ( Child , { } , s0 )
53
- return [ n0 , n1 ]
31
+ const n0 = createComponent (
32
+ Child ,
33
+ { } ,
34
+ createSlots ( {
35
+ mySlot : ( { message, changeMessage } ) => {
36
+ const n1 = t1 ( )
37
+ const n2 = /** @type {any } */ ( children ( n1 , 0 ) )
38
+ const n3 = /** @type {any } */ ( children ( n1 , 1 ) )
39
+ renderEffect ( ( ) => {
40
+ setText ( n2 , message ( ) )
41
+ } )
42
+ on ( n3 , 'click' , changeMessage )
43
+ return n1
44
+ } ,
45
+ // e.g. default slot
46
+ // default: () => {
47
+ // const n1 = t1()
48
+ // return n1
49
+ // }
50
+ } ) ,
51
+ )
52
+ return n0
54
53
} ) ( )
55
54
} ,
56
55
} )
You can’t perform that action at this time.
0 commit comments