diff --git a/docs/upload/detail/options.md b/docs/upload/detail/options.md index 590c46ae..79bddaf0 100644 --- a/docs/upload/detail/options.md +++ b/docs/upload/detail/options.md @@ -356,6 +356,9 @@ choose: function(obj){ // delete files[index]; //删除列表中对应的文件,一般在某个事件中使用 }); } + +// 获取本次选取的文件,大文件建议用此方法获取文件信息(2.9.9+) +obj.getChooseFiles(); ``` 详细用法参考:[#示例](#demo-files-table) diff --git a/src/modules/upload.js b/src/modules/upload.js index e5cea0b2..811d809a 100644 --- a/src/modules/upload.js +++ b/src/modules/upload.js @@ -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; } };