From f77ebec8708be52944fd49a719d683d4119c52e0 Mon Sep 17 00:00:00 2001 From: Lindy <33708359+Lindysen@users.noreply.github.com> Date: Sun, 10 Nov 2019 10:34:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(Progress):=20Progress=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=20(#2262)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/style/var.less | 10 ++++++++++ packages/progress/index.less | 16 +++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/packages/common/style/var.less b/packages/common/style/var.less index 7ae21088..7d9b946b 100644 --- a/packages/common/style/var.less +++ b/packages/common/style/var.less @@ -292,6 +292,16 @@ @popup-close-icon-margin: 16px; @popup-close-icon-z-index: 1; +// Progress +@progress-height: 4px; +@progress-background-color: @gray-light; +@progress-pivot-padding: 0 5px; +@progress-color: @blue; +@progress-pivot-font-size: @font-size-xs; +@progress-pivot-line-height: 1.6; +@progress-pivot-background-color: @blue; +@progress-pivot-text-color: @white; + // Radio @radio-size: 20px; @radio-border-color: @gray-light; diff --git a/packages/progress/index.less b/packages/progress/index.less index 77392374..b2370b96 100644 --- a/packages/progress/index.less +++ b/packages/progress/index.less @@ -3,15 +3,16 @@ .van-progress { position: relative; - height: 4px; - border-radius: 4px; - .theme(background, '@gray-light'); + .theme(height, '@progress-height'); + .theme(border-radius, '@progress-height'); + .theme(background, '@progress-background-color'); &__portion { position: absolute; left: 0; height: 100%; border-radius: inherit; + .theme(background, '@progress-color'); } &__pivot { @@ -20,13 +21,14 @@ right: 0; box-sizing: border-box; min-width: 2em; - padding: 0 5px; - font-size: 10px; - line-height: 1.6; text-align: center; word-break: keep-all; border-radius: 1em; transform: translateY(-50%); - .theme(background-color, '@gray-light'); + .theme(color, '@progress-pivot-text-color'); + .theme(padding, '@progress-pivot-padding'); + .theme(font-size, '@progress-pivot-font-size'); + .theme(line-height, '@progress-pivot-line-height'); + .theme(background-color, '@progress-pivot-background-color'); } }