Skip to content

Commit 87afa06

Browse files
committed
Merge branch 'dev' into move_to_typescript
2 parents 3fd8bb4 + 0603ff6 commit 87afa06

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

BACKERS.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
408408

409409
<!--10 start-->
410410
- Sara McVey
411-
- Роман Латкин
411+
- Keisuke Kita
412412
- Alex Riviere
413413
- Thomas Sittig
414414
- WhereJuly
@@ -444,7 +444,7 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
444444
- Shawn Wildermuth
445445
- Andrew Willis
446446
- Elon Hung
447-
- Chris Calo
447+
- Роман Латкин
448448
- Juan Bermudez
449449
- Hannes Kochniß
450450
- Daniel Mattingley
@@ -456,11 +456,9 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
456456
- Jere Sjöroos
457457
- Donald Fischer
458458
- Eric
459-
- Marcos Moura
460459
- tyler madsen
461460
- Joe Gregory
462461
- Masahiro Tanaka
463-
- Guilherme S L de Souza
464462
- Tyler
465463
- IMGNRY
466464
- Jim Raden
@@ -482,7 +480,7 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
482480
- Victor Tolbert
483481
- Lars Andreas Ness
484482
- Benjamin Listwon
485-
- Keisuke Kita
483+
- Chris Calo
486484
<!--10 end-->
487485

488486
<h2 align="center">Backers via OpenCollective</h2>

src/compiler/parser/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ export function parse(template: string, options: CompilerOptions): ASTElement {
8383
platformMustUseProp = options.mustUseProp || no
8484
platformGetTagNamespace = options.getTagNamespace || no
8585
const isReservedTag = options.isReservedTag || no
86-
maybeComponent = (el: ASTElement) => !!el.component || !isReservedTag(el.tag)
87-
86+
maybeComponent = (el: ASTElement) => !!(
87+
el.component ||
88+
el.attrsMap[':is'] ||
89+
el.attrsMap['v-bind:is'] ||
90+
!(el.attrsMap.is ? isReservedTag(el.attrsMap.is) : isReservedTag(el.tag))
91+
)
8892
transforms = pluckModuleFunction(options.modules, 'transformNode')
8993
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode')
9094
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode')

test/unit/modules/compiler/parser.spec.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,4 +909,20 @@ describe('parser', () => {
909909
expect(ast.children[2].type).toBe(3)
910910
expect(ast.children[2].text).toBe('\ndef')
911911
})
912+
913+
// #10152
914+
it('not warn when scoped slot used inside of dynamic component on regular element', () => {
915+
parse(`
916+
<div>
917+
<div is="customComp" v-slot="slotProps"></div>
918+
<div :is="'customComp'" v-slot="slotProps"></div>
919+
<div v-bind:is="'customComp'" v-slot="slotProps"></div>
920+
</div>
921+
`, baseOptions)
922+
expect('v-slot can only be used on components or <template>').not.toHaveBeenWarned()
923+
924+
parse(`<div is="customComp"><template v-slot="slotProps"></template></div>`, baseOptions)
925+
expect(`<template v-slot> can only appear at the root level inside the receiving the component`)
926+
.not.toHaveBeenWarned()
927+
})
912928
})

types/vnode.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface VNode {
2020
elm?: Node;
2121
ns?: string;
2222
context?: Vue;
23-
key?: string | number;
23+
key?: string | number | symbol | boolean;
2424
componentOptions?: VNodeComponentOptions;
2525
componentInstance?: Vue;
2626
parent?: VNode;

0 commit comments

Comments
 (0)