fix(slots): properly force update on forwarded slots

fix #1594
This commit is contained in:
Evan You
2020-07-15 20:12:49 -04:00
parent 44e6da1402
commit aab99abd28
7 changed files with 99 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
import { Data } from '../component'
import { Slots, RawSlots, CompiledSlotTypes } from '../componentSlots'
import { Slots, RawSlots } from '../componentSlots'
import {
VNodeArrayChildren,
openBlock,
@@ -7,7 +7,7 @@ import {
Fragment,
VNode
} from '../vnode'
import { PatchFlags } from '@vue/shared'
import { PatchFlags, SlotFlags } from '@vue/shared'
import { warn } from '../warning'
/**
@@ -39,7 +39,7 @@ export function renderSlot(
Fragment,
{ key: props.key },
slot ? slot(props) : fallback ? fallback() : [],
(slots as RawSlots)._ === CompiledSlotTypes.STATIC
(slots as RawSlots)._ === SlotFlags.STABLE
? PatchFlags.STABLE_FRAGMENT
: PatchFlags.BAIL
)