mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-24 15:39:15 +08:00
feat(Progress): percantage can be string
This commit is contained in:
parent
cd3cc07254
commit
72fbbc3b15
@ -61,12 +61,12 @@ Use `pivot-text` to custom text,use `color` to custom bar color
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| inactive | Whether to be gray | *boolean* | `false` |
|
||||
| percentage | Percentage | *number* | `0` |
|
||||
| percentage | Percentage | *number \| string* | `0` |
|
||||
| stroke-width `v2.2.1` | Stroke width | *number \| string* | `4px` |
|
||||
| show-pivot | Whether to show text | *boolean* | `true` |
|
||||
| color | Color | *string* | `#1989fa` |
|
||||
| text-color | Text color | *string* | `#fff` |
|
||||
| track-color `v2.2.9` | Track color | *string* | `#e5e5e5` |
|
||||
| pivot-text | Text | *string* | percentage |
|
||||
| pivot-color | Text background color | *string* | inherit progress color |
|
||||
| pivot-text | Pivot text | *string* | percentage |
|
||||
| pivot-color | Pivot text background color | *string* | inherit progress color |
|
||||
| text-color | Pivot text color | *string* | `#fff` |
|
||||
| inactive | Whether to be gray | *boolean* | `false` |
|
||||
| show-pivot | Whether to show text | *boolean* | `true` |
|
||||
|
@ -64,12 +64,12 @@ Vue.use(Progress);
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
|------|------|------|------|
|
||||
| inactive | 是否置灰 | *boolean* | `false` |
|
||||
| percentage | 进度百分比 | *number* | `0` |
|
||||
| percentage | 进度百分比 | *number \| string* | `0` |
|
||||
| stroke-width `v2.2.1` | 进度条粗细,默认单位为`px` | *number \| string* | `4px` |
|
||||
| show-pivot | 是否显示进度文字 | *boolean* | `true` |
|
||||
| color | 进度条颜色 | *string* | `#1989fa` |
|
||||
| text-color | 进度文字颜色 | *string* | `#fff` |
|
||||
| track-color `v2.2.9` | 轨道颜色 | *string* | `#e5e5e5` |
|
||||
| pivot-text | 文字显示 | *string* | 百分比文字 |
|
||||
| pivot-color | 文字背景色 | *string* | 与进度条颜色一致 |
|
||||
| pivot-text | 进度文字内容 | *string* | 百分比 |
|
||||
| pivot-color | 进度文字背景色 | *string* | 同进度条颜色 |
|
||||
| text-color | 进度文字颜色 | *string* | `#fff` |
|
||||
| inactive | 是否置灰 | *boolean* | `false` |
|
||||
| show-pivot | 是否显示进度文字 | *boolean* | `true` |
|
||||
|
@ -12,7 +12,7 @@ export default createComponent({
|
||||
trackColor: String,
|
||||
strokeWidth: [Number, String],
|
||||
percentage: {
|
||||
type: Number,
|
||||
type: [Number, String],
|
||||
required: true,
|
||||
validator: value => value >= 0 && value <= 100,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user