Commit f9ea9e01 by zhaochengxiang

采集

parent 4fce3580
......@@ -5,19 +5,18 @@ import { dispatch } from '../../../../model';
const ApprovalCheckbox = ({ value, onChange }) => {
const currentChecked = useMemo(() => {
if (value === 'true') return true;
if (value === 'false') return false;
if (value === '') return true;
if (value === '') return false;
return null;
}, [value])
const handleChange = (e) => {
onChange?.(`${e.target.checked}`);
onChange?.(e.target.checked?'是':'否');
}
return (
<Checkbox
defaultChecked={false}
checked={currentChecked}
onChange={handleChange}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment