fix: ensure backwards compat for pre-compiled sfc components

fix #3493
This commit is contained in:
Evan You
2021-03-27 10:53:45 -04:00
parent 9ff70be2b3
commit 37c17091fd
16 changed files with 278 additions and 96 deletions

View File

@@ -26,7 +26,7 @@ export function renderSlot(
// this is not a user-facing function, so the fallback is always generated by
// the compiler and guaranteed to be a function returning an array
fallback?: () => VNodeArrayChildren,
hasSlotted?: boolean
noSlotted?: boolean
): VNode {
let slot = slots[name]
@@ -54,7 +54,7 @@ export function renderSlot(
? PatchFlags.STABLE_FRAGMENT
: PatchFlags.BAIL
)
if (hasSlotted && rendered.scopeId) {
if (!noSlotted && rendered.scopeId) {
rendered.slotScopeIds = [rendered.scopeId + '-s']
}
isRenderingCompiledSlot--