import { ComponentType } from 'react' import { StandardProps, CommonEventFunction, FormItemProps } from './common' interface CheckboxProps extends StandardProps { /** ``标识,选中时触发``的 change 事件,并携带 `` 的 value * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid */ value: string /** 是否禁用 * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid * @default false */ disabled?: boolean /** 当前是否选中,可用来设置默认选中 * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid * @default false */ checked?: boolean /** checkbox的颜色,同 css 的 color * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid */ color?: string /** * Checkbox 的名字 * @supported h5, harmony, harmony_hybrid */ name?: string /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上 * @supported h5, harmony_hybrid */ nativeProps?: Record /** 无障碍访问,(属性)元素的额外描述 * @supported qq */ ariaLabel?: string /** 选中项发生变化时触发 change 事件,小程序无此 API * @supported alipay, h5, rn, harmony, harmony_hybrid */ onChange?: CommonEventFunction<{ value: string[] }> } /** 多选项目 * @classification forms * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony, harmony_hybrid * @example_react * ```tsx * export default class PageCheckbox extends Component { * state = { * list: [ * { * value: '美国', * text: '美国', * checked: false * }, * { * value: '中国', * text: '中国', * checked: true * }, * { * value: '巴西', * text: '巴西', * checked: false * }, * { * value: '日本', * text: '日本', * checked: false * }, * { * value: '英国', * text: '英国', * checked: false * }, * { * value: '法国', * text: '法国', * checked: false * } * ] * } * render () { * return ( * * * 默认样式 * 选中 * 未选中 * * * 推荐展示样式 * {this.state.list.map((item, i) => { * return ( * * ) * })} * * * ) * } * } * ``` * @example_vue * ```html * * * * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/component/checkbox.html */ declare const Checkbox: ComponentType export { Checkbox, CheckboxProps }