Browse Source

form

master
巴林闲侠 2 years ago
parent
commit
4005a7d181
  1. 46
      console/client/src/sections/console/containers/setUp.js

46
console/client/src/sections/console/containers/setUp.js

@ -4,26 +4,33 @@ import { connect } from 'react-redux';
import { import {
BorderlessTableOutlined, BlockOutlined, RollbackOutlined BorderlessTableOutlined, BlockOutlined, RollbackOutlined
} from '@ant-design/icons'; } from '@ant-design/icons';
import { Col, Row, Button, Modal, Input } from 'antd'; import { Col, Row, Button, Modal, Form, Input } from 'antd';
import '../style.less' import '../style.less'
function SetUp ({ dispatch }) { function SetUp ({ dispatch }) {
const [form] = Form.useForm();
const [renderMenu, setRenderMenu] = useState([]) const [renderMenu, setRenderMenu] = useState([])
const [renderForm, setRenderForm] = useState(false)
const [levelOneMenu] = useState([{ const [levelOneMenu] = useState([{
n: '参数标定', n: '参数标定',
ic: <BlockOutlined className='setup-icon' />, ic: <BlockOutlined className='setup-icon' />,
child: [ click: () => {
{ setRenderMenu([
n: '塔机参数', {
ic: <BorderlessTableOutlined className='setup-icon' /> n: '塔机参数',
}, { ic: <BorderlessTableOutlined className='setup-icon' />,
n: '返回', click: () => {
ic: <RollbackOutlined className='setup-icon' />, setRenderForm(true)
click: () => { }
dispatch(push('/')); }, {
} n: '返回',
}, ic: <RollbackOutlined className='setup-icon' />,
] click: () => {
setRenderMenu(levelOneMenu)
}
},
])
}
}, { }, {
n: '限位告警参数', n: '限位告警参数',
ic: <BorderlessTableOutlined className='setup-icon' /> ic: <BorderlessTableOutlined className='setup-icon' />
@ -57,6 +64,19 @@ function SetUp ({ dispatch }) {
} }
</div> </div>
{/* <Form form={form} name="control-hooks" >
<Form.Item
name="note"
label="Note"
rules={[
{
required: true,
},
]}
>
<Input />
</Form.Item>
</Form> */}
</div> </div>
) )
} }

Loading…
Cancel
Save