Closed executivesplace closed 5 years ago
2.5.17
https://jsfiddle.net/jsotron5000/eywraw8t/464522/
Run the JSFiddle and open up dev tools. You will see the Vue warning about duplicate default slots even though there is only one slot in the template.
No warning when using child components slotted into a renderless component.
A warning is displayed saying there are duplicate default slots when there is only one.
Here is another JSFiddle with a use case where this bug would occur:
https://jsfiddle.net/jsotron5000/eywraw8t/464242/
It is a renderless tabs component that works with another component (TabItem) which can be passed in through a slot.
The TabContainer component looks at the TabItem components and relays them to the parent component through a scoped slot.
The warning only displays when doing anything with the child vnodes inside the render function.
If you replace the children prop in the JSFiddle with just a hard coded array there is no warning.
Duplicate of #8546
Version
2.5.17
Reproduction link
https://jsfiddle.net/jsotron5000/eywraw8t/464522/
Steps to reproduce
Run the JSFiddle and open up dev tools. You will see the Vue warning about duplicate default slots even though there is only one slot in the template.
What is expected?
No warning when using child components slotted into a renderless component.
What is actually happening?
A warning is displayed saying there are duplicate default slots when there is only one.
Here is another JSFiddle with a use case where this bug would occur:
https://jsfiddle.net/jsotron5000/eywraw8t/464242/
It is a renderless tabs component that works with another component (TabItem) which can be passed in through a slot.
The TabContainer component looks at the TabItem components and relays them to the parent component through a scoped slot.
The warning only displays when doing anything with the child vnodes inside the render function.
If you replace the children prop in the JSFiddle with just a hard coded array there is no warning.