2017-01-16 2 views
1

これは私のHTMLコードですが、何らかの形でこの選択コンポーネントでテキストラップが機能しません。誰かがアイデアを持っていますか?イオン2テキストは選択コンポーネントをラップしません

あなた.sassで
<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> 
+0

あなたは '空白を設定しようとしている:ノーマル; '' selectWidth'のcssクラスでは? –

+0

はい、重要なタグでさえ... –

+0

これを動作させる方法の完全なコードを投稿できますか? selectWidthクラスには何がありますか? – user3561494

答えて

2

オーバーライドこのクラス

.alert-radio-label { 
    white-space: normal!important; 
} 
+0

ありがとう。あなたも同様に開くアラートボックスの色を変更する方法を知っていますか? .alert-radio-label –

+0

これを使う:.alert-wrapper { background-color:purple!important; } –

+0

を修正しました。ありがとう:) –

-1

あなたmain.cssapp.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;} 
関連する問題