UI视图
ProgressView
显示任务进度。
不传 value 时,ProgressView 显示不确定进度的转圈指示器;传入 value 时,显示已完成 total 中的多少。children 是标签。
import { ProgressView } from "onescript/views"
<ProgressView>加载中…</ProgressView>import { ProgressView } from "onescript/views"
<ProgressView
value={done}
total={files.length}
currentValueLabel={`${done} / ${files.length} 个文件`}
>
正在下载
</ProgressView>| Prop | Type | 说明 |
|---|---|---|
value | number | 已完成的量,范围 0 到 total。省略时为不确定进度。 |
total | number | 表示完成的正数,默认 1。 |
currentValueLabel | ViewChild | 描述当前进度,例如 "3 / 10"。 |
children | ViewChild | 标签。 |
total 和 currentValueLabel 需要与 value 一起使用;value 超出 0...total 时会抛出 TypeError。
用 progressViewStyle 选择线性进度条或转圈指示器。也支持修饰符。可在 App、Action 和 Widget 视图中使用。
How is this guide?
最后更新于