import React from 'react'; import { Spin, Form, } from 'antd'; import '../../policy/policy.less'; const NewDetail = Form.create()(React.createClass({ getInitialState() { return { visible: false, loading: false, }; }, cancelFun(){ this.props.closeDesc(false,false); }, componentWillMount() { if (this.props.data.id) { } else { this.state.data = {}; }; }, componentWillReceiveProps(nextProps) { if (!this.props.visible && nextProps.visible) { this.state.textFileList = []; this.state.videoFileList = []; if (nextProps.data.id) { } else { this.state.data = {}; }; this.props.form.resetFields(); }; }, render() { const theData = this.props.data || {}; const FormItem = Form.Item const formItemLayout = { labelCol: { span:12}, wrapperCol: { span: 12 }, }; return (
{theData.admin?theData.admin:'管理员'}
{theData.title}
{theData.body}
{theData.resourceName}
{theData.releaseDate}
) } })); export default NewDetail;