feat(upload): choose 回调的参数中新增 getChooseFiles 方法 (#1849)

This commit is contained in:
morning-star 2024-05-03 17:40:53 +08:00 committed by GitHub
parent 0e31264812
commit a7e06d7d06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -356,6 +356,9 @@ choose: function(obj){
// delete files[index]; //删除列表中对应的文件,一般在某个事件中使用
});
}
// 获取本次选取的文件,大文件建议用此方法获取文件信息(2.9.9+)
obj.getChooseFiles();
```
详细用法参考:[#示例](#demo-files-table)

View File

@ -453,6 +453,10 @@ layui.define(['lay', 'layer'], function(exports){
var newFile = new File([file], filename);
that.files = that.files || {};
that.files[index] = newFile;
},
// 获取本次选取的文件
getChooseFiles: function(){
return that.chooseFiles;
}
};