[improvement] Checkbox: add checked-color prop (#2057)
This commit is contained in:
@@ -31,7 +31,14 @@ export default {
|
||||
<van-checkbox v-model="checked" disabled>Checkbox</van-checkbox>
|
||||
```
|
||||
|
||||
#### Custom Color
|
||||
|
||||
```html
|
||||
<van-checkbox v-model="checked" checked-color="#4b0">Checkbox</van-checkbox>
|
||||
```
|
||||
|
||||
#### Custom Icon
|
||||
|
||||
Use icon slot to custom icon
|
||||
|
||||
```html
|
||||
@@ -58,6 +65,7 @@ export default {
|
||||
```
|
||||
|
||||
#### Checkbox Group
|
||||
|
||||
When Checkboxes are inside a CheckboxGroup, the checked checkboxes's name is an array and bound with CheckboxGroup by v-model.
|
||||
|
||||
```html
|
||||
@@ -131,11 +139,12 @@ export default {
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| name | Checkbox name | `any` | - |
|
||||
| shape | Can be set to `round` `square` | `String` | `round` |
|
||||
| v-model | Check status | `Boolean` | `false` |
|
||||
| disabled | Diable checkbox | `Boolean` | `false` |
|
||||
| label-disabled | Whether to disable label click | `Boolean` | `false` |
|
||||
| label-position | Can be set to `left` | `String` | `right` |
|
||||
| shape | Can be set to `round` `square` | `String` | `round` |
|
||||
| checked-color | Checked color | `String` | `#1989fa` | - |
|
||||
|
||||
### CheckboxGroup API
|
||||
|
||||
|
||||
Reference in New Issue
Block a user