[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

@@ -60,7 +60,7 @@ export default {
| v-model | Current rate | `Number` | - |
| rate | Target rate | `Number` | `100` |
| size | Circle size | `String` | `100px` |
| color | Progress bar color | `String` | `#38f` |
| color | Progress bar color | `String` | `#1989fa` |
| layer-color | Layer color | `String` | `#fff` |
| fill | Fill color | `String` | `none` |
| speed | Animate speedrate/s| `Number` | - |

View File

@@ -13,6 +13,7 @@
<script>
import create from '../utils/create';
import { raf, cancel } from '../utils/raf';
import { BLUE } from '../utils/color';
export default create({
name: 'circle',
@@ -39,7 +40,7 @@ export default create({
},
color: {
type: String,
default: '#38f'
default: BLUE
},
strokeWidth: {
type: Number,

View File

@@ -6,7 +6,7 @@ exports[`renders demo correctly 1`] = `
<div class="van-circle" style="width:120px;height:120px;">
<svg viewBox="0 0 1060 1060">
<path d="M 530 530 m -500, 0 a 500, 500 0 1, 1 1000, 0 a 500, 500 0 1, 1 -1000, 0" class="van-circle__hover" style="fill:none;stroke:#fff;stroke-width:40px;"></path>
<path d="M 530 530 m -500, 0 a 500, 500 0 1, 1 1000, 0 a 500, 500 0 1, 1 -1000, 0" class="van-circle__layer" style="stroke:#38f;stroke-dashoffset:3140px;stroke-width:41px;"></path>
<path d="M 530 530 m -500, 0 a 500, 500 0 1, 1 1000, 0 a 500, 500 0 1, 1 -1000, 0" class="van-circle__layer" style="stroke:#1989fa;stroke-dashoffset:3140px;stroke-width:41px;"></path>
</svg>
<div class="van-circle__text">0%</div>
</div>

View File

@@ -61,7 +61,7 @@ export default {
| v-model | 当前进度 | `Number` | - | - |
| rate | 目标进度 | `Number` | `100` | - |
| size | 圆环直径 | `String` | `100px` | - |
| color | 进度条颜色 | `String` | `#38f` | - |
| color | 进度条颜色 | `String` | `#1989fa` | - |
| layer-color | 轨道颜色 | `String` | `#fff` | - |
| fill | 填充颜色 | `String` | `none` | - |
| speed | 动画速度(单位为 rate/s| `Number` | - | - |