mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 01:54:48 +00:00
[improvement] update color variables (#2010)
This commit is contained in:
@@ -55,7 +55,7 @@ Use `pivot-text` to custom text,use `color` to custom bar color
|
||||
| inactive | Whether to be gray | `Boolean` | `false` |
|
||||
| percentage | Percentage | `Number` | `false` |
|
||||
| show-pivot | Whether to show text | `Boolean` | `true` |
|
||||
| color | Color | `String` | `#38f` |
|
||||
| color | Color | `String` | `#1989fa` |
|
||||
| pivot-text | Text | `String` | percentage |
|
||||
| pivot-color | Text background color | `String` | inherit progress color |
|
||||
| text-color | Text color | `String` | `#fff` |
|
||||
|
@@ -8,6 +8,7 @@
|
||||
|
||||
<script>
|
||||
import create from '../utils/create';
|
||||
import { BLUE } from '../utils/color';
|
||||
|
||||
export default create({
|
||||
name: 'progress',
|
||||
@@ -27,7 +28,7 @@ export default create({
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '#38f'
|
||||
default: BLUE
|
||||
},
|
||||
textColor: {
|
||||
type: String,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
exports[`renders demo correctly 1`] = `
|
||||
<div>
|
||||
<div>
|
||||
<div class="van-progress"><span class="van-progress__portion van-progress__portion--with-pivot" style="width:0px;background:#38f;"><span class="van-progress__pivot" style="color:#fff;background:#38f;">50%</span></span>
|
||||
<div class="van-progress"><span class="van-progress__portion van-progress__portion--with-pivot" style="width:0px;background:#1989fa;"><span class="van-progress__pivot" style="color:#fff;background:#1989fa;">50%</span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`calc width 1`] = `<div class="van-progress"><span class="van-progress__portion" style="width: 0px; background: rgb(51, 136, 255);"><!----></span></div>`;
|
||||
exports[`calc width 1`] = `<div class="van-progress"><span class="van-progress__portion" style="width: 0px; background: rgb(25, 137, 250);"><!----></span></div>`;
|
||||
|
||||
exports[`calc width 2`] = `
|
||||
<div class="van-progress"><span class="van-progress__portion van-progress__portion--with-pivot" style="width: 0px; background: rgb(51, 136, 255);"><span class="van-progress__pivot" style="color: rgb(255, 255, 255); background: rgb(51, 136, 255);">test</span></span>
|
||||
<div class="van-progress"><span class="van-progress__portion van-progress__portion--with-pivot" style="width: 0px; background: rgb(25, 137, 250);"><span class="van-progress__pivot" style="color: rgb(255, 255, 255); background: rgb(25, 137, 250);">test</span></span>
|
||||
</div>
|
||||
`;
|
||||
|
@@ -57,7 +57,7 @@ Vue.use(Progress);
|
||||
| inactive | 是否置灰 | `Boolean` | `false` | - |
|
||||
| percentage | 进度百分比 | `Number` | `false` | - |
|
||||
| show-pivot | 是否显示进度文字 | `Boolean` | `true` | - |
|
||||
| color | 进度条颜色 | `String` | `#38f` | - |
|
||||
| color | 进度条颜色 | `String` | `#1989fa` | - |
|
||||
| text-color | 进度条文字颜色 | `String` | `#fff` | - |
|
||||
| pivot-text | 文字显示 | `String` | 百分比文字 | - |
|
||||
| pivot-color | 文字背景色 | `String` | 与进度条颜色一致 | - |
|
||||
|
Reference in New Issue
Block a user