feat(table): 新增单元格编辑时textarea标签选项
默认是input标签,现在增加了textarea标签选项,能丰富做表格编辑项目时的选择。
This commit is contained in:
		
							parent
							
								
									ad3f441e5b
								
							
						
					
					
						commit
						d5ed4a4c42
					
				
							
								
								
									
										2
									
								
								dist/layui.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/layui.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -1705,6 +1705,9 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
 | 
				
			|||||||
      //显示编辑表单
 | 
					      //显示编辑表单
 | 
				
			||||||
      if(editType){
 | 
					      if(editType){
 | 
				
			||||||
        var input = $('<input class="layui-input '+ ELEM_EDIT +'">');
 | 
					        var input = $('<input class="layui-input '+ ELEM_EDIT +'">');
 | 
				
			||||||
 | 
					        if(editType === 'textarea') {
 | 
				
			||||||
 | 
					          input = $('<textarea class="layui-input ' + ELEM_EDIT + '"></textarea>');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        input[0].value = othis.data('content') || elemCell.text();
 | 
					        input[0].value = othis.data('content') || elemCell.text();
 | 
				
			||||||
        othis.find('.'+ELEM_EDIT)[0] || othis.append(input);
 | 
					        othis.find('.'+ELEM_EDIT)[0] || othis.append(input);
 | 
				
			||||||
        input.focus();
 | 
					        input.focus();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user