From 8d8457246daac543c5935aa3cbf62d362431da43 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 23 Jan 2019 10:20:01 -0500 Subject: [PATCH] feat: warning for ambiguous v-slot usage --- src/compiler/parser/index.js | 7 +++++ .../component/component-scoped-slot.spec.js | 29 +++++++++++++++---- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/compiler/parser/index.js b/src/compiler/parser/index.js index ca202ffbc3a..1f59bb93519 100644 --- a/src/compiler/parser/index.js +++ b/src/compiler/parser/index.js @@ -627,6 +627,13 @@ function processSlotContent (el) { el ) } + if (el.scopedSlots) { + warn( + `To avoid scope ambiguity, the default slot should also use ` + + `