进度条。
起始版本:1.0.0
名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|
percent | number | 0 | 否 | 百分比0~100。 |
show-info | boolean | false | 否 | 在进度条右侧显示百分比。 |
border-radius | number/string | 6 | 否 | 圆角大小。 |
font-size | number/string | 16 | 否 | 右侧百分比字体大小。 |
stroke-width | number/string | 4 | 否 | 进度条线的宽度。 |
color | string | #0A59F7 | 否 | 进度条进行中颜色,同activeColor。 |
activeColor | string | #0A59F7 | 否 | 已选择的进度条的颜色。 |
backgroundColor | string | #00000019 | 否 | 未选择的进度条的颜色。 |
active | boolean | false | 否 | 进度条从左往右的动画。 |
active-mode | string | backwards | 否 |
起始版本:1.0.3 |
duration | number | 30 | 否 | 进度增加1%所需毫秒数。 |
bindactiveend | eventhandle | - | 否 | 动画完成事件。 |
<view class="page-section page-section-gap"> <progress percent="20" show-info /> <progress percent="20" show-info font-size="20px" /> <progress percent="40" active /> <progress percent="60" stroke-width="10" /> <progress percent="60" stroke-width="10" border-radius="5" /> <progress percent="80" color="#6abf47" /> <progress percent="80" activeColor="#6abf47" /> <progress percent="80" backgroundColor="#f4333c" /> </view>