File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -370,11 +370,15 @@ To pass slots to a child component using render functions:
370
370
render () {
371
371
// `<div><child v-slot="props"><span>{{ props.text }}</span></child></div>`
372
372
return Vue .h (' div' , [
373
- Vue .h (' child' , {}, {
373
+ Vue .h (
374
+ Vue .resolveComponent (' child' ),
375
+ {},
374
376
// pass `slots` as the children object
375
377
// in the form of { name: props => VNode | Array<VNode> }
376
- default : (props ) => Vue .h (' span' , props .text )
377
- })
378
+ {
379
+ default : (props ) => Vue .h (' span' , props .text )
380
+ }
381
+ )
378
382
])
379
383
}
380
384
```
@@ -389,7 +393,9 @@ Vue.h(
389
393
{
390
394
level: 1
391
395
},
392
- [Vue .h (' span' , ' Hello' ), ' world!' ]
396
+ {
397
+ default : () => [Vue .h (' span' , ' Hello' ), ' world!' ]
398
+ }
393
399
)
394
400
```
395
401
You can’t perform that action at this time.
0 commit comments