type InnerCheckboxProps = { classList?: any, class?: any, checked?: any, disabled?: boolean, type?: 'radio' | 'checkbox', onChange?: Function, value?: any, name?: string, label?: string, inner?: boolean } export function InnerCheckbox(props: InnerCheckboxProps){ let type = props.type || 'checkbox'; const classList = () => ({ ...props.classList, [props.class]: true, 'cm-checkbox': true, 'cm-checkbox-checked': props.checked, 'cm-checkbox-indeterminate': props.checked === 'indeterminate', disabled: props.disabled }); const onClick = () => { if (props.disabled) { return; } if (type == 'radio' && props.checked) { return; } let flag = props.checked; if (flag === 'indeterminate') { flag = true; } else { flag = !flag; } if (props.onChange) { props.onChange(flag, props.value); } } return
{/* 文字对齐辅助 */} A {}} />  
}