UNPKG

hm-react-cli

Version:

Create a Huimei React project by module

37 lines (32 loc) 1 kB
import { Row, Col } from 'antd'; import { connect } from 'react-redux'; const mapState = (state) => ({ count: state.count }); const mapDispatch = ({ count: { increment, incrementAsync } }) => ({ increment: () => increment(1), incrementAsync: () => incrementAsync(1) }); function LayoutDemo(props) { return ( <div> <div>{props.count}</div> <Row> <Col span={12}>.ant-col-12</Col> <Col span={12}>.ant-col-12</Col> </Row> <Row> <Col span={8}>.ant-col-8</Col> <Col span={8}>.ant-col-8</Col> <Col span={8}>.ant-col-8</Col> </Row> <Row> <Col span={6}>.ant-col-6</Col> <Col span={6}>.ant-col-6</Col> <Col span={6}>.ant-col-6</Col> <Col span={6}>.ant-col-6</Col> </Row> </div> ); } export default connect(mapState, mapDispatch)(LayoutDemo);