mirror of
https://github.com/youzan/vant.git
synced 2025-10-24 11:05:28 +00:00
1.2 KiB
1.2 KiB
Progress
Install
import { Progress } from 'vant';
Vue.use(Progress);
Usage
Basic Usage
Use 'percentage' prop to set current progress
<van-progress :percentage="0" />
<van-progress :percentage="46" />
<van-progress :percentage="100" />
Inactive
<van-progress inactive :percentage="0" />
<van-progress inactive :percentage="46" />
<van-progress inactive :percentage="100" />
Custom Style
Use pivotText to custom text,use color to custom bar color
<van-progress pivotText="Red" color="#ed5050" :percentage="26" />
<van-progress pivotText="Orange" color="#f60" :percentage="46" />
<van-progress pivotText="Yellow" color="#f09000" :percentage="66" />
API
| Attribute | Description | Type | Default | Accepted Values |
|---|---|---|---|---|
| inactive | Whether to be gray | Boolean |
false |
- |
| percentage | Percentage | Number |
false |
0-100 |
| showPivot | Whether to show text | Boolean |
true |
- |
| pivotText | Text | String |
percentage | - |
| color | Color | String |
#38f |
hexvalue |
| textColor | Text color | String |
#fff |
hexvalue |