index.jsx 801B

123456789101112131415161718192021222324252627282930
  1. import React, { useState } from 'react';
  2. import { PageContainer } from '@ant-design/pro-components';
  3. import { Row, Col, Card } from 'antd';
  4. import List from './List';
  5. import BasicForm from './BasicForm';
  6. import DishList from './DishList';
  7. import './style.less';
  8. export default (props) => {
  9. const [current, setCurrent] = useState({});
  10. return (
  11. <PageContainer>
  12. <Card>
  13. <Row gutter={100}>
  14. <Col span={8}>
  15. <List current={current} setCurrent={setCurrent}/>
  16. </Col>
  17. <Col span={8}>
  18. <BasicForm current={current} onChange={it => setCurrent(it)} />
  19. <div style={{ marginTop: '100px' }}>
  20. <DishList current={current} />
  21. </div>
  22. </Col>
  23. </Row>
  24. </Card>
  25. </PageContainer>
  26. )
  27. }