You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- /*
- * @Author: 赵伟
- * @Date: 2024-04-28 14:18:11
- * @Description: 自定义 Table 单元格,没有数据时展示 --
- */
-
- import { Tooltip } from 'antd';
-
- function renderCell(text?: string | null) {
- return <span>{text ?? '--'}</span>;
- }
-
- function CommonTableCell(ellipsis: boolean = false) {
- if (ellipsis) {
- return (text?: string | null) => (
- <Tooltip title={text} placement="topLeft" overlayStyle={{ maxWidth: '400px' }}>
- {renderCell(text)}
- </Tooltip>
- );
- } else {
- return renderCell;
- }
- }
-
- export default CommonTableCell;
|