| 
									
										
										
										
											2025-10-22 14:43:42 +08:00
										 |  |  | import Table from "@cqsjjb/jjb-react-admin-component/Table"; | 
					
						
							|  |  |  | import { getIndexColumn } from "../../utils/index"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function TablePro(props) { | 
					
						
							|  |  |  |   const { | 
					
						
							|  |  |  |     columns = [], | 
					
						
							|  |  |  |     showIndex = true, | 
					
						
							|  |  |  |     useAlignCenter = true, | 
					
						
							| 
									
										
										
										
											2025-10-28 11:28:18 +08:00
										 |  |  |     rowKey = 'id', | 
					
						
							| 
									
										
										
										
											2025-10-22 14:43:42 +08:00
										 |  |  |     ...restProps | 
					
						
							|  |  |  |   } = props; | 
					
						
							| 
									
										
										
										
											2025-10-28 15:16:58 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-10-22 14:43:42 +08:00
										 |  |  |   const storeIndex = props.storeIndex || `${window.process.env.app.antd["ant-prefix"]}_${Math.random().toString(36).substring(2)}`; | 
					
						
							|  |  |  |   function calcColumns() { | 
					
						
							|  |  |  |     showIndex && columns.unshift(getIndexColumn(props.pagination)); | 
					
						
							| 
									
										
										
										
											2025-10-23 16:52:53 +08:00
										 |  |  |     return columns.map(item => ({ align: useAlignCenter ? "center" : "left", ...item })); | 
					
						
							| 
									
										
										
										
											2025-10-22 14:43:42 +08:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2025-10-28 11:28:18 +08:00
										 |  |  |   return <Table rowKey={rowKey} storeIndex={storeIndex} columns={calcColumns()} {...restProps} />; | 
					
						
							| 
									
										
										
										
											2025-10-22 14:43:42 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default TablePro; |