Pārlūkot izejas kodu

fix: scoped slots dynamic check should include v-for on element itself

fix #9596
Evan You 7 gadi atpakaļ
vecāks
revīzija
2277b2322c
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/compiler/codegen/index.js

+ 1 - 1
src/compiler/codegen/index.js

@@ -366,7 +366,7 @@ function genScopedSlots (
   // components with only scoped slots to skip forced updates from parent.
   // but in some cases we have to bail-out of this optimization
   // for example if the slot contains dynamic names, has v-if or v-for on them...
-  let needsForceUpdate = Object.keys(slots).some(key => {
+  let needsForceUpdate = el.for || Object.keys(slots).some(key => {
     const slot = slots[key]
     return (
       slot.slotTargetDynamic ||