我正在尝试在输入末尾使用 Ionic 2 获取范围滑块的值。
In the 文档 http://ionicframework.com/docs/v2/api/components/range/Range/#output-events唯一可用的事件是 ionChange,它在输入期间触发多次,我只需要最后一个值来执行操作。
我尝试手动添加 touchend 事件,但该事件被忽略。
这里还有一个Plunker http://plnkr.co/edit/kLQXHX4eyZ7bBiKGBUsx?p=preview与问题。
<ion-range (ionChange)="showVal($event)" (touchend)="presentValue(event)" min="0" max="100" [(ngModel)]="currentTime" color="danger">
<ion-icon small range-left name="sunny"></ion-icon>
<ion-icon range-right name="sunny"></ion-icon>
</ion-range>
有人知道如何在 Ionic 2 中监听范围滑块上的 touchend 事件吗?
还有ionBlur
and ionFocus
您可以使用的范围输入上的事件。
The ionFocus
当您滑过范围时触发
和ionBlur
当您释放范围项目时会触发
<ion-range (ionBlur)="rangeBlurred($event)" (ionFocus)="rangeFocused($event)">
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)