Commit b631be29 by zhaochengxiang

采集

parent f9ea9e01
......@@ -4,20 +4,13 @@ import { Modal, Checkbox, Row, Col, Divider, Input, Typography, Form, Switch, Se
import { dispatch } from '../../../../model';
const ApprovalCheckbox = ({ value, onChange }) => {
const currentChecked = useMemo(() => {
if (value === '是') return true;
if (value === '否') return false;
return null;
}, [value])
const handleChange = (e) => {
onChange?.(e.target.checked?'是':'否');
}
return (
<Checkbox
checked={currentChecked}
checked={value==='是'}
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