import type { ProTableProps } from '@ant-design/pro-table' import { mergeTableProps as _mergeTableProps } from '@genting/hooks' import { Typography } from 'antd' const { Text } = Typography export function mergeTableProps>( ...args: Parameters> ) { const tableProps = _mergeTableProps(...args) // 处理 columns,重写 render 方法实现省略段落 tableProps.columns?.forEach((column) => { if (column.ellipsis) { const oldRender = column.render column.render = (...args) => { const [remark, , , , { width }] = args return ( {oldRender?.(...args) || remark} ) } column.ellipsis = false } }) return tableProps }