From 7ddc0a39d6a8f2fd912b9e62c1f454c46ca0dd91 Mon Sep 17 00:00:00 2001 From: juneszh Date: Wed, 26 May 2021 17:13:20 +0800 Subject: [PATCH] Update upload.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复拖拽上传时index为0的bug --- src/modules/upload.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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); //是否自动触发上传 }); }