[英]Ionic 2 Text doesnt Wrap in Select Component
下面是我的HTML代碼,但是在該“選擇組件”中, text-wrap
不起作用。 有人有主意嗎?
<ion-list> <h5 color="primary"> Choose: </h5> <ion-item text-wrap> <ion-select text-wrap class="selectWidth" okText="Ok" cancelText="Cancel" [selectOptions]="selectOptions" [(ngModel)]="Decision"> <ion-option text-wrap selected="true" color="primary" value="vone" text-wrap>first first first first first</ion-option> <ion-option text-wrap color="primary" value="vtwo">second second second second second second second</ion-option> <ion-option text-wrap color="primary" value="vthree">third third third third third</ion-option> </ion-select> </ion-item> </ion-list>
在您的.sass中覆蓋此類
.alert-radio-label {
white-space: normal!important;
}
將以下內容添加到main.css
或app.scss
應該可以解決此問題:
.alert-ios .alert-radio-label{ white-space: pre-line;}
.alert-md .alert-radio-label{ white-space: pre-line;}
.alert-wp .alert-radio-label{ white-space: pre-line;}
.select-text { white-space: pre-line;}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.