新增试卷【内容描述】字段非必填修改

main
hujunpeng 3 months ago
parent 7b3e2547c7
commit c2a14dada8
  1. 3
      packages/examination/src/views/examPaper/examPaperAdd.tsx

@ -127,7 +127,7 @@ class ExamPaperAdd extends Component<any, States> {
formValues['totalScore'] = res.data.head.totalScore; formValues['totalScore'] = res.data.head.totalScore;
formValues['examDuration'] = res.data.head.examDuration; formValues['examDuration'] = res.data.head.examDuration;
formValues['durationType'] = String(res.data.head.durationType); formValues['durationType'] = String(res.data.head.durationType);
formValues['paperContent'] = res.data.head.paperContent; formValues['paperContent'] = res.data.head.paperContent.trim() === '' ? '' : res.data.head.paperContent;
this.formRef.current.setFieldsValue(formValues); this.formRef.current.setFieldsValue(formValues);
} }
}).catch(() => { }).catch(() => {
@ -463,7 +463,6 @@ class ExamPaperAdd extends Component<any, States> {
label="内容描述:" label="内容描述:"
name="paperContent" name="paperContent"
style={{ width: 1190 }} style={{ width: 1190 }}
rules={[{ required: true, message: '请输入内容描述' }]}
> >
<Input.TextArea placeholder="请输入内容描述" maxLength={200} showCount/> <Input.TextArea placeholder="请输入内容描述" maxLength={200} showCount/>
</Form.Item> </Form.Item>

Loading…
Cancel
Save