Slot is a concept proposed by vue, as the name suggests, slots are used to decide what to carry, inserted into a specified location, so that the template is chunked, with modular characteristics and greater reusability.
Whether the slot is displayed or not, how it is displayed is controlled by the parent component, and where the slot is displayed is controlled by the child component.
1. Default slot

2. Named slot
3. The default content of the slot
You can write content in the slot tag of a child component, display the default content of the child component when the parent component does not write, and replace the default content of the child component when the parent component writes
4. Compilation scope
5. Scope slot
Original link: https://www.cnblogs.com/loveyt/p/9946450.html https://blog.csdn.net/xiaolinlife/article/details/89517928