1,page页面
import React, { PureComponent } from 'react';
import { findDOMNode } from 'react-dom';
import {Link} from 'react-router-dom';
import { connect } from 'dva';
import {
Radio,
Input,
Form,
Select,Modal,Icon,DatePicker,Button,Upload
} from 'antd';
const FormItem = Form.Item;
const RadioButton = Radio.Button;
const RadioGroup = Radio.Group;
const Option = Select.Option;
const { Search, TextArea } = Input;
@Form.create()
class Edit extends PureComponent {
//数据双向绑定开始
state = {inputMsg:''};
getInitialState = ()=>{
}
handelChange = (event)=>{
// console.log('a',event.target.value)
this.setState({
inputMsg:event.target.value,
})
// console.log('vv',this.state.inputMsg)
}
componentDidUpdate() {
const dictionary=this.props.mapping;
if (this.state.inputMsg=='') {
this.setState({
inputMsg: dictionary.name,
})
}
}
//数据双向绑定结束
addEditShow = ()=>{
const list=this.props.list;
const dictionaryDetails=this.props.dictionaryDetails;
const dictionary=this.props.mapping;
const isNewRecord = this.props.isNewRecord;
const { getFieldDecorator, getFieldsError, getFieldError, isFieldTouched } =