peng.peng 1 year ago
parent
commit
e8b56b0e44
  1. 10
      web/client/src/sections/metadataManagement/components/releaseModal.js

10
web/client/src/sections/metadataManagement/components/releaseModal.js

@ -13,7 +13,7 @@ const ReleaseModal = ({ actions, dispatch, onConfirm, onCancel, editData = {} })
const [fieldData, setFiedData] = useState([]) const [fieldData, setFiedData] = useState([])
const [database, setDatabase] = useState({}) const [database, setDatabase] = useState({})
const [fieldValue, setFiedValue] = useState([]) const [fieldValue, setFiedValue] = useState([])
const [indeterminate, setIndeterminate] = useState(false) const [checked, setChecked] = useState(false)
const [fromData, setFromData] = useState([{ field: '', condition: '', value: '' }]) const [fromData, setFromData] = useState([{ field: '', condition: '', value: '' }])
const [interfaceName, setInterfaceName] = useState('') const [interfaceName, setInterfaceName] = useState('')
const [interfaceUrl, setInterfaceUrl] = useState('') const [interfaceUrl, setInterfaceUrl] = useState('')
@ -77,9 +77,9 @@ const ReleaseModal = ({ actions, dispatch, onConfirm, onCancel, editData = {} })
<TabPane key="field"> <TabPane key="field">
<div style={{ fontSize: 20, fontWeight: 600 }}>选择字段</div> <div style={{ fontSize: 20, fontWeight: 600 }}>选择字段</div>
{/* <div style={{ marginLeft: 20 }}> */} {/* <div style={{ marginLeft: 20 }}> */}
<Checkbox indeterminate={indeterminate} style={{ margin: '20px 40px' }} onChange={e => { <Checkbox checked={checked} style={{ margin: '20px 40px' }} onChange={e => {
setFiedValue(e.target.checked ? fieldList : []); setFiedValue(e.target.checked ? fieldList : []);
setIndeterminate(e.target.checked); setChecked(e.target.checked);
}}> }}>
全选 全选
</Checkbox> </Checkbox>
@ -88,9 +88,9 @@ const ReleaseModal = ({ actions, dispatch, onConfirm, onCancel, editData = {} })
<CheckboxGroup options={fieldList} value={fieldValue} onChange={v => { <CheckboxGroup options={fieldList} value={fieldValue} onChange={v => {
setFiedValue(v) setFiedValue(v)
if (v?.length == fieldList?.length) { if (v?.length == fieldList?.length) {
setIndeterminate(true) setChecked(true)
} else { } else {
setIndeterminate(false) setChecked(false)
} }
}} /> }} />
</div> </div>

Loading…
Cancel
Save