mirror of https://github.com/layui/layui
修复 upload 当打开文件选择框并点击取消后,导致文件上传失效的问题
parent
92465e0a29
commit
34d05cfae3
|
@ -588,8 +588,11 @@ layui.define(['lay','layer'], function(exports){
|
|||
that.elemFile.off('upload.change').on('upload.change', function(){
|
||||
var files = this.files || [];
|
||||
|
||||
if(files.length === 0) return;
|
||||
|
||||
extendAttrs.call(this);
|
||||
setChooseFile(files);
|
||||
|
||||
options.auto ? that.upload() : setChooseText(files); // 是否自动触发上传
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue