From 2d63e0497b2e2ae57841afb25166b44ed708c103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Thu, 14 Feb 2019 20:09:14 +0800 Subject: [PATCH] [bugfix] unify functional slots in lower vue version --- packages/utils/use/sfc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/use/sfc.ts b/packages/utils/use/sfc.ts index 6af3bd09f..92da4da53 100644 --- a/packages/utils/use/sfc.ts +++ b/packages/utils/use/sfc.ts @@ -57,7 +57,7 @@ function install(this: ComponentOptions, Vue: VueConstructor) { // unify slots & scopedSlots export function unifySlots(context: RenderContext) { - const { scopedSlots = {} } = context; + const scopedSlots = context.scopedSlots || context.data.scopedSlots || {}; const slots = context.slots(); Object.keys(slots).forEach(key => {