本文介绍了离子选择在Ionic 3中不会滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此选择以注册表格形式包含所有国家/地区的列表.关键是表格页面中的离子含量是可滚动的,但选择它自身不会滚动.这是代码:

This select contains the list of all countries in register form. The point is that the ion-content in the form page is scrollable but select it self is not scrolling.Here is the code:

 <ion-item>
       <ion-select interface="action-sheet" class="select" placeholder="Country">
          <ion-option ngDefaultControl [value]='country.name' *ngFor="let country of countries">{{country.name}}
          </ion-option>
        </ion-select>
       </ion-item>

为什么选择滚动条不起作用?

Why select scroll is not working?

推荐答案

这是一个已知问题,您可以在 https://github.com/ionic-team/ionic/issues/17311#issuecomment-460829890

This is a known issue, you can track at https://github.com/ionic-team/ionic/issues/17311#issuecomment-460829890

Ionic通过在global.scss中设置以下CSS提供了一种解决方法

Ionic have provided a workaround by setting following css in global.scss

.action-sheet-group {
    overflow: auto !important;
}

希望有帮助

这篇关于离子选择在Ionic 3中不会滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 15:59