• 配置项

    • 在Swiper配置中添加autoHeight: true
  • 示例代码

    var swiper = new Swiper('.swiper-container', {
      autoHeight: true,
      // 其他配置项
    });

    注意事项

    • 低版本的Swiper不支持autoHeight配置,建议使用Swiper 4.5.0及以上版本。