How to wordwrap a long string in ion-item

前端 未结 6 748
甜味超标
甜味超标 2020-12-13 08:04

IONIC has two problems about word-wrap in ion-item: 1. String would be truncated by the dots appended at the end, how to show full content without dots ? 2. Automatic line b

6条回答
  •  无人及你
    2020-12-13 08:45

    For Ionic 4, use text-wrap on your ion-label element, like so:

    
        
             Multiline text that should wrap when it is too long
             to fit on one line in the item.
        
      
    

    UPDATE: 10/30/2019 - CSS utility attributes are now deprecated in the latest version of Ionic 4, and will be going away completely in Ionic 5.

    It is recommended to use class="ion-text-wrap" moving forward:

    
        
             Multiline text that should wrap when it is too long
             to fit on one line in the item.
        
      
    

提交回复
热议问题