2018-03-09 05:26:34 +00:00
|
|
|
|
<cn>
|
|
|
|
|
#### 布局
|
|
|
|
|
Checkbox.Group内嵌Checkbox并与Grid组件一起使用,可以实现灵活的布局
|
|
|
|
|
</cn>
|
|
|
|
|
|
|
|
|
|
<us>
|
|
|
|
|
#### Use with grid
|
|
|
|
|
We can use Checkbox and Grid Checkbox.group, to implement complex layout
|
|
|
|
|
</us>
|
|
|
|
|
|
2019-10-09 10:32:23 +00:00
|
|
|
|
```tpl
|
2018-03-09 05:26:34 +00:00
|
|
|
|
<template>
|
|
|
|
|
<a-checkbox-group @change="onChange">
|
2018-03-09 09:50:33 +00:00
|
|
|
|
<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>
|
2018-03-09 05:26:34 +00:00
|
|
|
|
</a-checkbox-group>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
2019-09-28 12:45:07 +00:00
|
|
|
|
export default {
|
|
|
|
|
methods: {
|
|
|
|
|
onChange(checkedValues) {
|
|
|
|
|
console.log('checked = ', checkedValues);
|
|
|
|
|
},
|
2018-03-09 05:26:34 +00:00
|
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
|
};
|
2018-03-09 05:26:34 +00:00
|
|
|
|
</script>
|
|
|
|
|
```
|