index.tsx 709 Bytes
import { Empty, type EmptyProps } from 'antd';

export type UEmptyProps = EmptyProps;

/**
 * 项目统一空态。
 *
 * 默认走简版插画:antd 的默认插画是一只大箱子,放在卡片里会把「这里没有数据」
 * 说成「这里什么都没有」。列表与详情里的空态只需要一行克制的说明。
 *
 * 三个子应用原先各自 `import { Empty } from 'antd'`(含 App.tsx 的兜底页),
 * 本组件是那份统一入口;空态撑满表体的行为在 Table 的 locale 里注入,见 ui.css 的
 * .uj-table-fill 一节。
 */
export function UEmpty({ image = Empty.PRESENTED_IMAGE_SIMPLE, ...rest }: UEmptyProps) {
  return <Empty image={image} {...rest} />;
}