|
|
@@ -375,12 +375,18 @@ function genScopedSlots (
|
|
|
containsSlotChild(slot) // is passing down slot from parent which may be dynamic
|
|
|
)
|
|
|
})
|
|
|
- // OR when it is inside another scoped slot (the reactivity is disconnected)
|
|
|
- // #9438
|
|
|
+ // OR when it is inside another scoped slot or v-for (the reactivity may be
|
|
|
+ // disconnected due to the intermediate scope variable)
|
|
|
+ // #9438, #9506
|
|
|
+ // TODO: this can be further optimized by properly analyzing in-scope bindings
|
|
|
+ // and skip force updating ones that do not actually use scope variables.
|
|
|
if (!needsForceUpdate) {
|
|
|
let parent = el.parent
|
|
|
while (parent) {
|
|
|
- if (parent.slotScope && parent.slotScope !== emptySlotScopeToken) {
|
|
|
+ if (
|
|
|
+ (parent.slotScope && parent.slotScope !== emptySlotScopeToken) ||
|
|
|
+ parent.for
|
|
|
+ ) {
|
|
|
needsForceUpdate = true
|
|
|
break
|
|
|
}
|