import React,{ Component } from "react"; import { Form, Input, InputNumber, Switch, Radio, Slider, Button, Upload, Icon, Rate, Checkbox, message, Row, Col, Select, Modal, Tooltip } from 'antd'; import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor'; import axios from 'axios' import update from 'immutability-helper' import { qNameArray } from './common' import {getUrl, ActionBtn, DMDEditor} from 'educoder'; const { TextArea } = Input; const confirm = Modal.confirm; const $ = window.$ const { Option } = Select; class NullChildEditor extends Component{ constructor(props){ super(props); this.state = { } } // toMDMode = (that) => { // if (this.mdReactObject) { // let mdReactObject = this.mdReactObject; // this.mdReactObject = null // if (that != mdReactObject) { // mdReactObject.toShowMode() // } // } // this.mdReactObject = that; // } render() { let { question_title, question_score, question_type, question_choices, standard_answers } = this.state; let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish, answers } = this.props; // marginTop: '18px' return(
答案(填空{index + 1}):
{ answers.map((item, itemIndex) => { return
onAnswerChange(index, itemIndex, val)} >
{!exerciseIsPublish && {itemIndex != 0 && this.props.deleteChildAnswer(index, itemIndex)} style={{float: 'right'}} > } { addChildAnswer(index)} style={{float: 'right', visibility: itemIndex == answers.length - 1 ? '' : 'hidden', marginTop: '2px'}} > } }
}) } {/* {!exerciseIsPublish &&
addChildAnswer(index)} >+新增参考答案
} */}
) } } // RouteHOC() export default (NullChildEditor);