HarmonyOS Progress如何设置左边圆角。右边不需要圆角。?

如题:HarmonyOS Progress如何设置左边圆角。右边不需要圆角。?

阅读 540
1 个回答

请参考以下代码:

@Entry
@Component
struct ProgressExample {
  build() {
    Column({ space: 15 }) {
      Text('Linear Progress').fontSize(9).fontColor(0xCCCCCC).width('90%')
      Progress({ value: 20, total: 100, type: ProgressType.Linear })
        .width(200)
        .backgroundColor('#B3E54C')
        .style({ strokeRadius: 0, strokeWidth: 100, })
        .color('#917AF9')
        .borderColor('#00000000')
        .borderRadius({
          topLeft: 20,
          topRight: 0,
          bottomLeft: 20,
          bottomRight: 0
        })
        .clip(true)
    }
    .width('100%')
    .margin({ top: 30 })
  }
}
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进