wuyanan

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

... ... @@ -63,7 +63,7 @@ export struct LiveFollowComponent {
bottom: 0,
})
//号主名称
Text(this.rmhInfo.rmhName)
Text(this.getRmhName())
.fontColor(Color.White)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.maxLines(1)
... ... @@ -151,4 +151,11 @@ export struct LiveFollowComponent {
}
})
}
getRmhName() {
if (this.rmhInfo.rmhName.length > 7) {
return this.rmhInfo.rmhName.substring(0, 7) + "..."
}
return this.rmhInfo.rmhName
}
}
\ No newline at end of file
... ...