具名插槽判断:

<div v-if="$slots.footer" slot="footer">
      <slot name="footer"></slot>
 </div>

匿名插槽判断

<div v-if="$slots.default">
      <slot></slot>
</div>

 

 

 

相关文章:

  • 2021-11-17
  • 2021-07-19
猜你喜欢
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
  • 2021-10-30
相关资源
相似解决方案