import React, { PureComponent } from 'react';
import router from 'umi/router';
import { Form, Card, Button, Row, Col } from 'antd';
import { connect } from 'dva';
import Panel from '../../../components/Panel';
import styles from '../../../layouts/Sword.less';
import { CODE_DETAIL } from '../../../actions/code';
const FormItem = Form.Item;
@connect(({ code }) => ({
code,
}))
@Form.create()
class CodeView extends PureComponent {
componentWillMount() {
const {
dispatch,
match: {
params: { id },
},
} = this.props;
dispatch(CODE_DETAIL(id));
}
handleEdit = () => {
const {
match: {
params: { id },
},
} = this.props;
router.push(`/tool/code/edit/${id}`);
};
render() {
const {
code: { detail },
} = this.props;
const formItemLayout = {
labelCol: {
span: 8,
},
wrapperCol: {
span: 16,
},
};
const formAllItemLayout = {
labelCol: {
span: 4,
},
wrapperCol: {
span: 20,
},
};
const action = (
);
return (
);
}
}
export default CodeView;