Ionic

ionic3之ion-select 有选择项的下拉框

2018-09-13  本文已影响0人  云小诺

类似于这种:


image.png
<ion-select  selectedText="{{seclectedCountry}}" >
   <ion-option *ngFor="let num of country" (ionSelect)="selectNumber(num)" value={{num.value}}>{{num.title}}   {{num.value}}</ion-option>
</ion-select>



selectNumber(num) {
   this.seclectedCountry = num.value;
}

重点就是这个 selectedText属性,放入要显示出来的值即可。

上一篇 下一篇

猜你喜欢

热点阅读