diff --git a/src/progress/index.js b/src/progress/index.js index f93ab19ea..5e1cd1618 100644 --- a/src/progress/index.js +++ b/src/progress/index.js @@ -1,12 +1,13 @@ import { createNamespace, isDef, addUnit } from '../utils'; -import { BLUE, WHITE } from '../utils/constant'; const [createComponent, bem] = createNamespace('progress'); export default createComponent({ props: { + color: String, inactive: Boolean, pivotText: String, + textColor: String, pivotColor: String, trackColor: String, strokeWidth: [String, Number], @@ -18,14 +19,6 @@ export default createComponent({ showPivot: { type: Boolean, default: true - }, - color: { - type: String, - default: BLUE - }, - textColor: { - type: String, - default: WHITE } }, diff --git a/src/progress/index.less b/src/progress/index.less index 6196c4823..984948680 100644 --- a/src/progress/index.less +++ b/src/progress/index.less @@ -10,6 +10,7 @@ position: absolute; left: 0; height: 100%; + background: @progress-color; border-radius: inherit; } @@ -19,6 +20,7 @@ box-sizing: border-box; min-width: 3.6em; padding: @progress-pivot-padding; + color: @progress-pivot-text-color; font-size: @progress-pivot-font-size; line-height: @progress-pivot-line-height; text-align: center; diff --git a/src/progress/test/__snapshots__/demo.spec.js.snap b/src/progress/test/__snapshots__/demo.spec.js.snap index 87ba7f9bb..66c2e29a9 100644 --- a/src/progress/test/__snapshots__/demo.spec.js.snap +++ b/src/progress/test/__snapshots__/demo.spec.js.snap @@ -3,18 +3,18 @@ exports[`renders demo correctly 1`] = `
-
50%
+
50%
-
50%
+
50%
-
50%
+
50%
-
橙色
-
红色
-
紫色
+
橙色
+
红色
+
紫色
`; diff --git a/src/progress/test/__snapshots__/index.spec.js.snap b/src/progress/test/__snapshots__/index.spec.js.snap index a68821fd0..47201dd08 100644 --- a/src/progress/test/__snapshots__/index.spec.js.snap +++ b/src/progress/test/__snapshots__/index.spec.js.snap @@ -1,5 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`calc width 1`] = `
`; +exports[`calc width 1`] = `
`; -exports[`calc width 2`] = `
test
`; +exports[`calc width 2`] = `
test
`; diff --git a/src/style/var.less b/src/style/var.less index c8026ef28..bdcec1090 100644 --- a/src/style/var.less +++ b/src/style/var.less @@ -475,11 +475,13 @@ // Progress @progress-height: 4px; +@progress-color: @blue; @progress-background-color: @gray-light; @progress-pivot-padding: 0 5px; +@progress-pivot-text-color: @white; @progress-pivot-font-size: @font-size-xs; @progress-pivot-line-height: 1.6; -@progress-pivot-background-color: @gray-light; +@progress-pivot-background-color: @blue; // PullRefresh @pull-refresh-head-height: 50px;