进行空判断

This commit is contained in:
谢思 2022-09-02 14:28:42 +08:00
parent 390ea5cfff
commit 60f40e0a96
1 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ function NeedApply(props){
</Select>
)}
{helper("上传任务书","assignmentBook1",[{ validator: (rule,val,callback) =>{
if(!val.file.response.data){
if(val && !val.file.response.data){
setFileList(undefined);
callback('文件上传失败, 请检查文件内容后重新上传');
}else {
@ -216,7 +216,7 @@ function NeedApply(props){
<Input.TextArea placeholder="请输入竞赛内容简介" autoSize={{minRows: 4}} maxLength={200}/>, "oneLine errorBox"
)}
{helper("上传策划书","competitionProposal1",[{ validator: (rule,val,callback) =>{
if(!val.file.response.data){
if(val && !val.file.response.data){
setFileList(undefined);
callback('文件上传失败, 请检查文件内容后重新上传');
}else {