Browse Source

服务字段选择

master
wenlele 1 year ago
parent
commit
859d9114d6
  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 [database, setDatabase] = useState({})
const [fieldValue, setFiedValue] = useState([])
const [indeterminate, setIndeterminate] = useState(false)
const [checked, setChecked] = useState(false)
const [fromData, setFromData] = useState([{ field: '', condition: '', value: '' }])
const [interfaceName, setInterfaceName] = useState('')
const [interfaceUrl, setInterfaceUrl] = useState('')
@ -77,9 +77,9 @@ const ReleaseModal = ({ actions, dispatch, onConfirm, onCancel, editData = {} })
<TabPane key="field">
<div style={{ fontSize: 20, fontWeight: 600 }}>选择字段</div>
{/* <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 : []);
setIndeterminate(e.target.checked);
setChecked(e.target.checked);
}}>
全选
</Checkbox>
@ -88,9 +88,9 @@ const ReleaseModal = ({ actions, dispatch, onConfirm, onCancel, editData = {} })
<CheckboxGroup options={fieldList} value={fieldValue} onChange={v => {
setFiedValue(v)
if (v?.length == fieldList?.length) {
setIndeterminate(true)
setChecked(true)
} else {
setIndeterminate(false)
setChecked(false)
}
}} />
</div>

Loading…
Cancel
Save