[improvement] update color variables (#2010)

This commit is contained in:
neverland
2018-11-01 16:16:26 +08:00
committed by GitHub
parent 63816a4902
commit af168d6abc
40 changed files with 84 additions and 67 deletions

View File

@@ -55,7 +55,7 @@ Use `pivot-text` to custom textuse `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` |

View File

@@ -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,

View File

@@ -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>

View File

@@ -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>
`;

View File

@@ -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` | 与进度条颜色一致 | - |