[Doc] rename component README file (#3662)

This commit is contained in:
neverland
2019-06-27 14:22:40 +08:00
committed by GitHub
parent a56f96c246
commit ddb24e6762
119 changed files with 4 additions and 3 deletions
+76
View File
@@ -0,0 +1,76 @@
# Circle
### Install
``` javascript
import { Circle } from 'vant';
Vue.use(Circle);
```
## Usage
### Basic Usage
```html
<van-circle
v-model="currentRate"
:rate="30"
:speed="100"
:text="text"
/>
```
``` javascript
export default {
data() {
return {
currentRate: 0
};
},
computed: {
text() {
return this.currentRate.toFixed(0) + '%'
}
}
};
```
### Custom style
```html
<van-circle
v-model="currentRate"
color="#07c160"
fill="#fff"
size="120px"
layer-color="#ebedf0"
:text="text"
:rate="rate"
:speed="100"
:clockwise="false"
:stroke-width="60"
/>
```
## API
### Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| v-model | Current rate | `Number` | - |
| rate | Target rate | `Number` | `100` |
| size | Circle size | `String` | `100px` |
| color | Progress bar color | `String` | `#1989fa` |
| layer-color | Layer color | `String` | `#fff` |
| fill | Fill color | `String` | `none` |
| speed | Animate speedrate/s| `Number` | - |
| text | Text | `String` | - |
| stroke-width | Stroke width | `Number` | `40` |
| clockwise | Is clockwise | `Boolean` | `true` |
### Slots
| Name | Description |
|------|------|
| default | custom text content |