1.代码:
核心代码
ohos:max_text_lines="2"
ohos:multiple_lines="true"
ohos:truncation_mode="ellipsis_at_end"
<Text
ohos:height="match_content"
ohos:width="match_parent"
ohos:max_text_lines="2"
ohos:multiple_lines="true"
ohos:text="OLED面板技术是近年来逐渐火热的话题,苹果手机从iPhoneX开始便使用OLED屏幕,大屏幕的电视也在早几年就用上了OLED屏幕-手机从iPhoneX开始"
ohos:text_size="18vp"
ohos:truncation_mode="ellipsis_at_end"/>