You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<cn>
|
|
|
|
|
#### 布局
|
|
|
|
|
Checkbox.Group内嵌Checkbox并与Grid组件一起使用,可以实现灵活的布局
|
|
|
|
|
</cn>
|
|
|
|
|
|
|
|
|
|
<us>
|
|
|
|
|
#### Use with grid
|
|
|
|
|
We can use Checkbox and Grid Checkbox.group, to implement complex layout
|
|
|
|
|
</us>
|
|
|
|
|
|
|
|
|
|
```html
|
|
|
|
|
<template>
|
|
|
|
|
<a-checkbox-group @change="onChange">
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8"><a-checkbox value="A">A</a-checkbox></a-col>
|
|
|
|
|
<a-col :span="8"><a-checkbox value="B">B</a-checkbox></a-col>
|
|
|
|
|
<a-col :span="8"><a-checkbox value="C">C</a-checkbox></a-col>
|
|
|
|
|
<a-col :span="8"><a-checkbox value="D">D</a-checkbox></a-col>
|
|
|
|
|
<a-col :span="8"><a-checkbox value="E">E</a-checkbox></a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
</a-checkbox-group>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
methods: {
|
|
|
|
|
onChange (checkedValues) {
|
|
|
|
|
console.log('checked = ', checkedValues)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
```
|