当前位置: 首页 > news >正文

【鸿蒙学习笔记】基础组件Progress:进度条组件

官方文档:Progress

目录标题

  • 作用
  • 最全属性迭代追加
  • 进度赋值
  • 风格样式

作用

进度条组件

最全属性迭代追加

Progress({ value: 20, total: 100, type: ProgressType.Linear }).color(Color.Green)// 颜色.width(200)// 大小.height(50)// 高度.value(50)// 进度可更新,20% → 50%.style({ strokeWidth: 10, scaleCount: 30, scaleWidth: 6, shadow: true }) // 设置进度条宽度,设置环形进度条总刻度数,设置环形进度条刻度粗细

进度赋值

Progress({ value: 20, type: ProgressType.Linear }).width(200) // 默认总数为100,20%
Progress({ value: 40, total: 200, type: ProgressType.Linear }).color(Color.Green).width(200) // 指定总数,20%
Progress({ value: 20, total: 100, type: ProgressType.Linear }).color(Color.Green).width(200).value(50) // 进度可更新,20% → 50%

在这里插入图片描述

风格样式

Column({ space: 15 }) {Text('Linear ').fontSize(15).fontColor(Color.Black).width('90%')Progress({ value: 20, type: ProgressType.Linear }).width(100)Text('Eclipse ').fontSize(15).fontColor(Color.Black).width('90%')Row({ space: 40 }) {Progress({ value: 10, type: ProgressType.Eclipse }).width(100)}Text('ScaleRing ').fontSize(15).fontColor(Color.Black).width('90%')Row({ space: 40 }) {Progress({ value: 50, type: ProgressType.ScaleRing }).width(100).style({ strokeWidth: 20, scaleCount: 30, scaleWidth: 9 })}Text('Ring ').fontSize(15).fontColor(Color.Black).width('90%')Row({ space: 40 }) {Progress({ value: 50, type: ProgressType.Ring }).width(100).style({ strokeWidth: 8})}Text('Capsule ').fontSize(15).fontColor(Color.Black).width('90%')Row({ space: 40 }) {Progress({ value: 50, type: ProgressType.Capsule }).width(100)}
}.width('100%').margin({ top: 30 })

在这里插入图片描述

http://www.lryc.cn/news/388611.html

相关文章:

  • 前程无忧滑块
  • 一站式uniapp优质源码项目模版交易平台的崛起与影响
  • Python中vars用法
  • 【机器学习】基于Transformer的迁移学习:理论与实践
  • 如何应对情绪和培养理性的书
  • [数据集][目标检测]电缆钢丝绳线缆缺陷检测数据集VOC+YOLO格式1800张3类别
  • 【Git 学习笔记】Ch1.1 Git 简介 + Ch1.2 Git 对象
  • Python 中别再用 ‘+‘ 拼接字符串了!
  • 六西格玛绿带培训的证书有什么用处?
  • 《妃梦千年》第二十章:风雨欲来
  • 深入理解二分法
  • 【C命名规范】遵循良好的命名规范,提高代码的可读性、可维护性和可复用性
  • Hbase面试题总结
  • C语言部分复习笔记
  • Rust学习笔记 (命令行命令) : 用override set 设置工具链
  • cv::Mat类的矩阵内容输出的各种格式的例子
  • Redis--注册中心集群 Cluster 集群-单服务器
  • CV01_相机成像原理与坐标系之间的转换
  • Android Lint
  • 【算法刷题 | 动态规划14】6.28(最大子数组和、判断子序列、不同的子序列)
  • vue3 vxe-grid列中绑定vxe-switch实现数据更新
  • Hive SQL:实现炸列(列转行)以及逆操作(行转列)
  • MD5算法详解
  • ES6的代理模式-Proxy
  • 排序(堆排序、快速排序、归并排序)-->深度剖析(二)
  • 七一建党节|热烈庆祝中国共产党成立103周年!
  • Spring Boot应用知识梳理
  • Spring中利用重载与静态分派
  • 文本三剑客之awk:
  • SpringSecurity-授权示例