21 lines
		
	
	
		
			465 B
		
	
	
	
		
			JavaScript
		
	
	
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			465 B
		
	
	
	
		
			JavaScript
		
	
	
	
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * 创建具有栅格化的表单项
							 | 
						||
| 
								 | 
							
								 * @param h
							 | 
						||
| 
								 | 
							
								 * @param formItemProps
							 | 
						||
| 
								 | 
							
								 * @param rowConfig
							 | 
						||
| 
								 | 
							
								 * @param colConfig
							 | 
						||
| 
								 | 
							
								 * @param children
							 | 
						||
| 
								 | 
							
								 * @returns {*}
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								export default function createFormComponent(h, formItemProps, rowConfig, colConfig, children = []) {
							 | 
						||
| 
								 | 
							
								  if (rowConfig) {
							 | 
						||
| 
								 | 
							
								    return h('a-row', rowConfig, [
							 | 
						||
| 
								 | 
							
								      h('a-col', colConfig, [
							 | 
						||
| 
								 | 
							
								        h('a-form-item', formItemProps, children)
							 | 
						||
| 
								 | 
							
								      ])
							 | 
						||
| 
								 | 
							
								    ])
							 | 
						||
| 
								 | 
							
								  }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  return h('a-form-item', formItemProps, children)
							 | 
						||
| 
								 | 
							
								}
							 |