feat(Progress): Add customizable progress track color (#2173)

This commit is contained in:
Eric Yuan 2019-10-20 12:56:28 +08:00 committed by neverland
parent aa9723e412
commit b6c7461e7e
2 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,10 @@ VantComponent({
type: String, type: String,
value: BLUE value: BLUE
}, },
trackColor: {
type: String,
value: "#e5e5e5",
},
textColor: { textColor: {
type: String, type: String,
value: '#fff' value: '#fff'

View File

@ -1,6 +1,6 @@
<wxs src="./index.wxs" module="getters" /> <wxs src="./index.wxs" module="getters" />
<view class="van-progress custom-class" style="height: {{ strokeWidthUnit }};"> <view class="van-progress custom-class" style="height: {{ strokeWidthUnit }}; background: {{trackColor}};">
<view <view
class="van-progress__portion" class="van-progress__portion"
style="width: {{ percentage }}%; background: {{ inactive ? '#cacaca' : color }}" style="width: {{ percentage }}%; background: {{ inactive ? '#cacaca' : color }}"