mirror of https://github.com/openspug/spug
improve host selector component
parent
4d86288ab5
commit
85895b63fa
|
@ -7,7 +7,7 @@ export default observer(function (props) {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [group, setGroup] = useState({});
|
const [group, setGroup] = useState({});
|
||||||
const [dataSource, setDataSource] = useState([]);
|
const [dataSource, setDataSource] = useState([]);
|
||||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
const [selectedRowKeys, setSelectedRowKeys] = useState(props.selectedRowKeys || []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!store.treeData.length) {
|
if (!store.treeData.length) {
|
||||||
|
@ -59,8 +59,8 @@ export default observer(function (props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
visible
|
visible={[undefined, true].includes(props.visible)}
|
||||||
width="70%"
|
width={1000}
|
||||||
title={props.title || '主机列表'}
|
title={props.title || '主机列表'}
|
||||||
onOk={handleSubmit}
|
onOk={handleSubmit}
|
||||||
confirmLoading={loading}
|
confirmLoading={loading}
|
||||||
|
|
Loading…
Reference in New Issue