在Ionic中,如何使用离子内容可滚动设置ion-slide autoHeight为true?

seb*_*bap 5 swiper ionic-framework

我希望滑块根据活动滑块高度调整其大小.

有一个选项autoHeight:true但它不起作用

options:
{
 autoHeight:true
}
Run Code Online (Sandbox Code Playgroud)

仅当ion-content scroll设置为false时,它才有效

Soo*_*Koh 0

我可以使用此 css 使 ionic 中的 swiper 具有自动高度大小

.swiper-wrapper {
  position: relative;  
}
Run Code Online (Sandbox Code Playgroud)

我的选项只是 ionic 文档中显示的默认选项

vm.options = {
  loop: true,
  effect: 'fade',
  speed: 500,
};
Run Code Online (Sandbox Code Playgroud)