# uni-data-checkbox
## Instructions
组件名:uni-data-checkbox
代码块: uDataCheckbox
点击下载&安装
### Syntax
- 使用 ``(或 ``,当需要包裹子节点时)。
- 遇到平台差异时,建议使用条件编译(`#ifdef / #endif`)显式处理。
#### Properties
| 属性名 | 类型 | 可选值 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| value/v-model | Array/String/Number | - | - | 默认值,multiple=true时为 Array类型,否则为 String或Number类型 |
| localdata | Array | - | - | 本地渲染数据 |
| mode | String | default/list/button/tag | default | 显示模式 |
| multiple | Boolean | - | false | 是否多选 |
| min | String/Number | - | - | 最小选择个数 ,multiple为true时生效 |
| max | String/Number | - | - | 最大选择个数 ,multiple为true时生效 |
| wrap | Boolean | - | - | 是否换行显示 |
| icon | String | left/right | left | list 列表模式下 icon 显示的位置 |
| selectedColor | String | - | #007aff | 选中颜色 |
| selectedTextColor | String | - | #333 | 选中文本颜色,如不填写则自动显示 |
| emptyText | String | - | 暂无数据 | 没有数据时显示的文字 ,本地数据无效 |
| map | Object | - | {text:'text',value:'value'} | 字段映射,将text/value映射到数据中的其他字段 |
#### Events
| 事件名 | 事件说明 | 返回参数 |
| --- | --- | --- |
| @change | 选中状态改变时触发事件 | - |
#### Platform Compatibility
See official docs for platform support table: `https://uniapp.dcloud.net.cn/component/uniui/uni-data-checkbox.html`
### Examples
### Example (Example 1)
```vue
```
### Example (Example 2)
```vue
```
### Example (Example 3)
```vue
```
### Example (Example 4)
```vue
```
### Example (Example 5)
```vue
```
### Example (Example 6)
```vue
```
Reference:
- [Official Documentation](https://uniapp.dcloud.net.cn/component/uniui/uni-data-checkbox.html)
- [Plugin Marketplace](https://ext.dcloud.net.cn/plugin?name=data-checkbox)
- [Local Example](examples/uni-ui/uni-data-checkbox.vue)