HarmonyOS 怎么只切左上和右上两个圆角?

使用 borderRadius 切圆角是切四个角,现在我的需求是切左上和右上两个圆角

阅读 508
1 个回答

参考demo:

@Entry
@Component
struct TextExample6 {
  @State text: string = '你叫什么名字'
  build() {
    Column() {
      Text(this.text)
        .fontSize(16)
        .border({ width: 1 })
        .lineHeight(20)
        .maxLines(1)
        .width(300)
        .margin({ left: 20, top: 20 })
        .borderRadius({
          bottomLeft : 10,
          bottomRight : 10
        })
    }.margin({
      top : 200
    })
  }
}