外观
Progress 进度条
用横向填充条显示可量化任务的完成比例,例如文件上传或内容校对。
import { SProgress } from '@icecreamqaq/shadcn/progress'使用示例
常用 API
| 成员 | 类型 | 用法 |
|---|---|---|
SProgress.modelValue | number | null | 默认值为 0。将完成比例换算成 0 到 100 之间的数值作为显示进度。 |
SProgress.getValueText | (value, max) => string | undefined | 自定义辅助技术读取的进度文本。 |
SProgress.class | HTMLAttributes["class"] | 调整轨道的宽度、高度或附加样式。 |
完整 API
Progress7 个成员
属性
| 名称 | 类型 |
|---|---|
modelValue | number | null |
max | number |
getValueLabel | ((value: number | null | undefined, max: number) => string | undefined) |
getValueText | ((value: number | null | undefined, max: number) => string | undefined) |
asChild | boolean |
as | AsTag | Component |
class | ClassValue |
分组导出
模板标签为 <s-progress>。
组件 SProgress