fed8ff3d3a
HQ 列表主操作居右、列设置贴最右侧;订单筛选状态可多选,导出同步过滤。 Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
987 B
TypeScript
37 lines
987 B
TypeScript
import type { ReactNode } from 'react';
|
|
import { Space, Typography } from 'antd';
|
|
|
|
/** 列表页顶栏:标题在左,主操作在右,列设置永远最右 */
|
|
export function AdminListHeader({
|
|
title,
|
|
description,
|
|
actions,
|
|
settings,
|
|
}: {
|
|
title?: ReactNode;
|
|
description?: ReactNode;
|
|
actions?: ReactNode;
|
|
settings?: ReactNode;
|
|
}) {
|
|
return (
|
|
<div className="admin-list-header">
|
|
<div className="admin-list-header-left">
|
|
{title == null || title === '' ? null : typeof title === 'string' || typeof title === 'number' ? (
|
|
<Typography.Title level={4} style={{ margin: 0 }}>
|
|
{title}
|
|
</Typography.Title>
|
|
) : (
|
|
title
|
|
)}
|
|
{description ? (
|
|
<div className="admin-list-header-desc">{description}</div>
|
|
) : null}
|
|
</div>
|
|
<div className="admin-list-header-right">
|
|
{actions ? <Space wrap>{actions}</Space> : null}
|
|
{settings}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|