docs: prettier all markdown files

This commit is contained in:
chenjiahan
2020-04-11 09:17:33 +08:00
committed by neverland
parent 48067f79db
commit 7f84f8a487
140 changed files with 4441 additions and 4723 deletions
+22 -27
View File
@@ -14,26 +14,21 @@ Vue.use(Circle);
### Basic Usage
```html
<van-circle
v-model="currentRate"
:rate="30"
:speed="100"
:text="text"
/>
<van-circle v-model="currentRate" :rate="30" :speed="100" :text="text" />
```
```js
export default {
data() {
return {
currentRate: 0
currentRate: 0,
};
},
computed: {
text() {
return this.currentRate.toFixed(0) + '%'
}
}
return this.currentRate.toFixed(0) + '%';
},
},
};
```
@@ -77,10 +72,10 @@ export default {
currentRate: 0,
gradientColor: {
'0%': '#3fecff',
'100%': '#6149f6'
}
'100%': '#6149f6',
},
};
}
},
};
```
@@ -111,21 +106,21 @@ export default {
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| v-model | Current rate | *number* | - |
| rate | Target rate | *number \| string* | `100` |
| size | Circle size | *number \| string* | `100px` |
| color `v2.1.4` | Progress color, passing object to render gradient | *string \| object* | `#1989fa` |
| layer-color | Layer color | *string* | `white` |
| fill | Fill color | *string* | `none` |
| speed | Animate speedrate/s| *number \| string* | `0` |
| text | Text | *string* | - |
| stroke-width | Stroke width | *number \| string* | `40` |
| stroke-linecap `v2.2.15` | Stroke linecapcan be set to `sqaure` `butt` | *string* | `round` |
| clockwise | Whether to be clockwise | *boolean* | `true` |
| --- | --- | --- | --- |
| v-model | Current rate | _number_ | - |
| rate | Target rate | _number \| string_ | `100` |
| size | Circle size | _number \| string_ | `100px` |
| color `v2.1.4` | Progress color, passing object to render gradient | _string \| object_ | `#1989fa` |
| layer-color | Layer color | _string_ | `white` |
| fill | Fill color | _string_ | `none` |
| speed | Animate speedrate/s | _number \| string_ | `0` |
| text | Text | _string_ | - |
| stroke-width | Stroke width | _number \| string_ | `40` |
| stroke-linecap `v2.2.15` | Stroke linecapcan be set to `sqaure` `butt` | _string_ | `round` |
| clockwise | Whether to be clockwise | _boolean_ | `true` |
### Slots
| Name | Description |
|------|------|
| Name | Description |
| ------- | ------------------- |
| default | custom text content |
+23 -33
View File
@@ -16,26 +16,21 @@ Vue.use(Circle);
`rate`属性表示进度条的目标进度,`v-model`表示动画过程中的实时进度。当`rate`发生变化时,`v-model`会以`speed`的速度变化,直至达到`rate`设定的值。
```html
<van-circle
v-model="currentRate"
:rate="30"
:speed="100"
:text="text"
/>
<van-circle v-model="currentRate" :rate="30" :speed="100" :text="text" />
```
```js
export default {
data() {
return {
currentRate: 0
currentRate: 0,
};
},
computed: {
text() {
return this.currentRate.toFixed(0) + '%'
}
}
return this.currentRate.toFixed(0) + '%';
},
},
};
```
@@ -85,10 +80,10 @@ export default {
currentRate: 0,
gradientColor: {
'0%': '#3fecff',
'100%': '#6149f6'
}
'100%': '#6149f6',
},
};
}
},
};
```
@@ -110,12 +105,7 @@ export default {
通过`size`属性设置圆环直径
```html
<van-circle
v-model="currentRate"
:rate="rate"
size="120px"
text="大小定制"
/>
<van-circle v-model="currentRate" :rate="rate" size="120px" text="大小定制" />
```
## API
@@ -123,21 +113,21 @@ export default {
### Props
| 参数 | 说明 | 类型 | 默认值 |
|------|------|------|------|
| v-model | 当前进度 | *number* | - |
| rate | 目标进度 | *number \| string* | `100` |
| size | 圆环直径,默认单位为 `px` | *number \| string* | `100px` |
| color `v2.1.4` | 进度条颜色,传入对象格式可以定义渐变色 | *string \| object* | `#1989fa` |
| layer-color | 轨道颜色 | *string* | `white` |
| fill | 填充颜色 | *string* | `none` |
| speed | 动画速度(单位为 rate/s| *number \| string* | `0` |
| text | 文字 | *string* | - |
| stroke-width | 进度条宽度 | *number \| string* | `40` |
| stroke-linecap `v2.2.15` | 进度条端点的形状,可选值为`sqaure` `butt` | *string* | `round` |
| clockwise | 是否顺时针增加 | *boolean* | `true` |
| --- | --- | --- | --- |
| v-model | 当前进度 | _number_ | - |
| rate | 目标进度 | _number \| string_ | `100` |
| size | 圆环直径,默认单位为 `px` | _number \| string_ | `100px` |
| color `v2.1.4` | 进度条颜色,传入对象格式可以定义渐变色 | _string \| object_ | `#1989fa` |
| layer-color | 轨道颜色 | _string_ | `white` |
| fill | 填充颜色 | _string_ | `none` |
| speed | 动画速度(单位为 rate/s) | _number \| string_ | `0` |
| text | 文字 | _string_ | - |
| stroke-width | 进度条宽度 | _number \| string_ | `40` |
| stroke-linecap `v2.2.15` | 进度条端点的形状,可选值为`sqaure` `butt` | _string_ | `round` |
| clockwise | 是否顺时针增加 | _boolean_ | `true` |
### Slots
| 名称 | 说明 |
|------|------|
| 名称 | 说明 |
| ------- | -------------- |
| default | 自定义文字内容 |