修复新版本对 table reload 造成影响的问题
This commit is contained in:
		
							parent
							
								
									9ed17a7ef4
								
							
						
					
					
						commit
						4b63b64865
					
				
							
								
								
									
										2
									
								
								dist/lay/modules/table.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/lay/modules/table.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/layui.all.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/layui.all.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -146,7 +146,7 @@ layui.use('upload', function(){
 | 
			
		||||
    ,auto: false
 | 
			
		||||
    ,bindAction: '#testListAction'
 | 
			
		||||
    ,choose: function(obj){   
 | 
			
		||||
      var files = obj.pushFile(); //将每次选择的文件追加到文件队列
 | 
			
		||||
      var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
 | 
			
		||||
 | 
			
		||||
      //读取本地文件
 | 
			
		||||
      obj.preview(function(index, file, result){
 | 
			
		||||
@ -180,7 +180,7 @@ layui.use('upload', function(){
 | 
			
		||||
        ,tds = tr.children();
 | 
			
		||||
        tds.eq(2).html('<span style="color: #5FB878;">上传成功</span>');
 | 
			
		||||
        tds.eq(3).html(''); //清空操作
 | 
			
		||||
        delete files[index]; //删除文件队列已经上传成功的文件
 | 
			
		||||
        delete this.files[index]; //删除文件队列已经上传成功的文件
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
      this.error(index, upload);
 | 
			
		||||
 | 
			
		||||
@ -1246,6 +1246,7 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
 | 
			
		||||
  thisTable.config = {};
 | 
			
		||||
  table.reload = function(id, options){
 | 
			
		||||
    var config = thisTable.config[id];
 | 
			
		||||
    options = options || {};
 | 
			
		||||
    if(!config) return hint.error('The ID option was not found in the table instance');
 | 
			
		||||
    if(options.data && options.data.constructor === Array) delete config.data;
 | 
			
		||||
    return table.render($.extend(true, {}, config, options));
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user