wip: only generate non-scope slot flag when compatConfig is present

This commit is contained in:
Evan You 2021-05-05 16:36:16 -04:00
parent 7a8cee8688
commit 61edb700d7

View File

@ -302,7 +302,7 @@ export function buildSlots(
children: TemplateChildNode[] children: TemplateChildNode[]
) => { ) => {
const fn = buildSlotFn(props, children, loc) const fn = buildSlotFn(props, children, loc)
if (__COMPAT__) { if (__COMPAT__ && context.compatConfig) {
fn.isNonScopedSlot = true fn.isNonScopedSlot = true
} }
return createObjectProperty(`default`, fn) return createObjectProperty(`default`, fn)