mirror of https://github.com/layui/layui
				
				
				
			feat(upload): choose 回调的参数中新增 getChooseFiles 方法 (#1849)
							parent
							
								
									0e31264812
								
							
						
					
					
						commit
						a7e06d7d06
					
				| 
						 | 
				
			
			@ -356,6 +356,9 @@ choose: function(obj){
 | 
			
		|||
    // delete files[index]; //删除列表中对应的文件,一般在某个事件中使用
 | 
			
		||||
  });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 获取本次选取的文件,大文件建议用此方法获取文件信息(2.9.9+)
 | 
			
		||||
obj.getChooseFiles();
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
详细用法参考:[#示例](#demo-files-table)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
      }
 | 
			
		||||
    };
 | 
			
		||||
    
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue