---
name: CheckboxGroup
title: 复选框父组件
category: 表单组件
owner: 常健驰
---

```atom 基础示例
<template>
    <view class="wrap">
        <checkbox-group @change="checkboxChange">
            <checkbox
                a-for="(item, index) in list"
                :value="item.value"
                :checked="item.checked"
                :disabled="item.disabled"
                :key="index"
            >
                {{ item.value }}
            </checkbox>
        </checkbox-group>
    </view>
</template>

<script type="config">
    {
        data: {
            list: [
                {
                    value: 'China',
                    text: '中国'
                },
                {
                    value: 'US',
                    text: '美国'
                },
                {
                    value: 'Britain',
                    text: '英国',
                    checked: true
                },
                {
                    value: 'Japan',
                    text: '日本',
                    disabled: true
                }
            ]
        },
        components: {
            'view': 'components/View/View',
            'checkbox-group': 'components/CheckboxGroup/CheckboxGroup',
            'checkbox': 'components/Checkbox/Checkbox'
        }
    }
</script>


<script>
export default {
    methods: {
        checkboxChange(e) {
            console.log(e);
        }
    }
};
</script>
```
## API
### Props


名称 | 类型 | 默认值 | 是否必选 | 描述 | 其他
--- | --- | --- | --- | --- | ----
name | string |  | 可选 | - | -

### Slots



名称 | 描述
--- | ---
default | checkbox-group的自定义内容




