File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -93,21 +93,27 @@ render() {
9393named slots:
9494
9595``` jsx
96- < MyComponent>
97- < header slot= " header" > header< / header>
98- < footer slot= " footer" > footer< / footer>
99- < / MyComponent>
96+ render () {
97+ return (
98+ < MyComponent>
99+ < header slot= " header" > header< / header>
100+ < footer slot= " footer" > footer< / footer>
101+ < / MyComponent>
102+ )
103+ }
100104```
101105
102106scoped slots:
103107
104108``` jsx
105- const scopedSlots = {
106- header : () => < header> header< / header> ,
107- footer : () => < footer> footer< / footer>
108- }
109+ render () {
110+ const scopedSlots = {
111+ header : () => < header> header< / header> ,
112+ footer : () => < footer> footer< / footer>
113+ }
109114
110- < MyComponent scopedSlots= {scopedSlots} / >
115+ return < MyComponent scopedSlots= {scopedSlots} / >
116+ }
111117```
112118
113119### Directives
You can’t perform that action at this time.
0 commit comments