Vue 组件插槽slot

slot 基本使用

  1插槽的基本使用<slot></slot>

  2.插槽的默认值<slot><button></button></slot>

具名插槽slot

在slot标签上添加 name=‘left’  。在组件中添加slot=‘left’

原文地址:https://www.cnblogs.com/jidanbufan/p/14042590.html