wuyanan

ref |> 直播详情人民号名称过长时截取规则和安卓保持一致

@@ -63,7 +63,7 @@ export struct LiveFollowComponent { @@ -63,7 +63,7 @@ export struct LiveFollowComponent {
63 bottom: 0, 63 bottom: 0,
64 }) 64 })
65 //号主名称 65 //号主名称
66 - Text(this.rmhInfo.rmhName) 66 + Text(this.getRmhName())
67 .fontColor(Color.White) 67 .fontColor(Color.White)
68 .textOverflow({ overflow: TextOverflow.Ellipsis }) 68 .textOverflow({ overflow: TextOverflow.Ellipsis })
69 .maxLines(1) 69 .maxLines(1)
@@ -151,4 +151,11 @@ export struct LiveFollowComponent { @@ -151,4 +151,11 @@ export struct LiveFollowComponent {
151 } 151 }
152 }) 152 })
153 } 153 }
  154 +
  155 + getRmhName() {
  156 + if (this.rmhInfo.rmhName.length > 7) {
  157 + return this.rmhInfo.rmhName.substring(0, 7) + "..."
  158 + }
  159 + return this.rmhInfo.rmhName
  160 + }
154 } 161 }