@@ -190,21 +197,29 @@ The `min` and `max` properties can help you to limit the number of checked items
Checkbox with button styles.
:::demo You just need to change `<el-checkbox>` element into `<el-checkbox-button>` element. We also provide `size` attribute for these buttons: `large` and `small`.
:::demo You just need to change `el-checkbox` element into `el-checkbox-button` element. We also provide `size` attribute.
```html
<template>
<divstyle="margin: 15px 0;"></div>
<div>
<el-checkbox-groupv-model="checkboxGroup1">
<el-checkbox-buttonv-for="city in cities":label="city":key="city">{{city}}</el-checkbox-button>
@@ -21,11 +26,11 @@ Single selection among multiple options.
Radio should not have too many options. Otherwise, use the Select component instead.
:::demo Creating a radio component is easy, you just need to bind a variable to Radio's `v-model`. It equals to the value of `label` of the chosen radio. The type of `label` is `String` or `Number`.
:::demo Creating a radio component is easy, you just need to bind a variable to Radio's `v-model`. It equals to the value of `label` of the chosen radio. The type of `label` is `String`, `Number` or `Boolean`.
<el-radiodisabledv-model="radio1"label="selected and disabled">Option B</el-radio>
</template>
<script>
...
...
@@ -67,13 +72,13 @@ Radio should not have too many options. Otherwise, use the Select component inst
Suitable for choosing from some mutually exclusive options.
:::demo Combine `<el-radio-group>` with `<el-radio>` to display a radio group. Bind a variable with `v-model` of `<el-radio-group>` element and set label value in `<el-radio>`. It also provides `change` event with the current value as its parameter.
:::demo Combine `el-radio-group` with `el-radio` to display a radio group. Bind a variable with `v-model` of `el-radio-group` element and set label value in `el-radio`. It also provides `change` event with the current value as its parameter.
```html
<el-radio-groupv-model="radio2">
<el-radio:label="3">optionA</el-radio>
<el-radio:label="6">optionB</el-radio>
<el-radio:label="9">optionC</el-radio>
<el-radio:label="3">Option A</el-radio>
<el-radio:label="6">Option B</el-radio>
<el-radio:label="9">Option C</el-radio>
</el-radio-group>
<script>
...
...
@@ -92,28 +97,42 @@ Suitable for choosing from some mutually exclusive options.
Radio with button styles.
:::demo You just need to change `<el-radio>` element into `<el-radio-button>` element. We also provide `size` attribute for these buttons: `large` and `small`.
:::demo You just need to change `el-radio` element into `el-radio-button` element. We also provide `size` attribute.