File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ function genSlot (el) {
121
121
const name = el . name
122
122
? `"${ el . name } "`
123
123
: ( el . dynamicName || '"default"' )
124
- return `$slots[${ name } ]`
124
+ return `( $slots[${ name } ] || ${ genChildren ( el ) } ) `
125
125
}
126
126
127
127
function genProps ( props ) {
Original file line number Diff line number Diff line change @@ -106,14 +106,18 @@ export function renderMixin (Vue) {
106
106
this . $options . _renderKey = key
107
107
this . $options . _renderData = data
108
108
this . $options . _renderChildren = children
109
- if ( children ) {
110
- this . $forceUpdate ( )
111
- return
112
- }
113
109
// set props - this will trigger update if any of them changed
110
+ // but not guaranteed
114
111
if ( data ) {
115
112
updateProps ( this , data )
116
113
}
114
+ // for now, if the component has content it always updates
115
+ // because we don't know whether the children have changed.
116
+ // need to optimize in the future.
117
+ if ( children ) {
118
+ this . $forceUpdate ( )
119
+ return
120
+ }
117
121
}
118
122
119
123
Vue . prototype . _render = function ( ) {
You can’t perform that action at this time.
0 commit comments