VUE 插槽

插槽就是在组件标签内 预留位置

例如:

<component>ddd</component> 默认情况下内部的内容会被忽略,  在组件模板中加入 插槽 <slot></slot> ddd 就不会被忽略

slot 上可以 v-bind 绑定变量,传递到父组件上

原文地址:https://www.cnblogs.com/chillaxyw/p/10447867.html