mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
34 lines
748 B
Plaintext
34 lines
748 B
Plaintext
# Progress
|
|
|
|
用于展示任务进度(如文件上传、加载状态)的线性进度条部件。
|
|
|
|
<WidgetExample name="progress-basic" />
|
|
|
|
## 适用场景
|
|
|
|
- **适用**:文件上传/下载、安装、加载等长时间任务的进度展示
|
|
- **适用**:表单提交、异步操作的等待反馈
|
|
- **不适用**:需要精确数值或不确定进度的场景(用 `text` 自行绘制)
|
|
|
|
## 用法
|
|
|
|
```tsx
|
|
import { Progress, ProgressLabel, ProgressValue } from "@lcui/react"
|
|
```
|
|
|
|
```tsx
|
|
<Progress value={20} />
|
|
```
|
|
|
|
## 示例
|
|
|
|
### 带标签
|
|
|
|
`Progress` 可接受 `ProgressLabel` 与 `ProgressValue` 子部件,标签行会显示在进度条上方。
|
|
|
|
<WidgetExample name="progress-label" />
|
|
|
|
## API 参考
|
|
|
|
<FieldTable name="progress" />
|