diff --git a/src/modules/upload.js b/src/modules/upload.js index 3338867b..27570370 100644 --- a/src/modules/upload.js +++ b/src/modules/upload.js @@ -502,12 +502,7 @@ layui.define('layer' , function(exports){ othis.removeAttr('lay-over'); setChooseFile(files); - - if(options.auto){ - that.upload(files); - } else { - setChooseText(files); - } + options.auto ? that.upload() : setChooseText(files); //是否自动触发上传 }); }