import React, { FunctionComponent, ReactNode, Ref } from 'react'; import './index.scss'; interface PntGeneralLayoutProps { /** * 自定义类名 */ className?: string; /** * 头部标题内容 * @description 传入后将渲染 Layout Header 区域 */ headerTitle?: ReactNode; /** * 是否显示返回按钮 * @default false */ showBackButton?: boolean; /** * 返回按钮点击回调 */ onBackButtonClick?: (() => void) | undefined; /** * 是否显示头部底部分割线 * @default true */ headerBordered?: boolean; /** * 子头部内容 * @description 位于 Header 下方,常用于放置面包屑、Tab 等 */ subHeaderContent?: ReactNode; /** * 头部右侧操作区 * @description 常用于放置按钮组 */ operation?: ReactNode; /** * 内容区 ref */ bodyRef?: Ref; /** * 页面主体内容 */ children?: ReactNode; /** * 内容区自定义样式 */ bodyStyle?: React.CSSProperties; /** * 内容区内边距 * @description 数字按 px 处理;需要全出血内容时可传 '24px 0' * @default 24 */ bodyPadding?: number | string; /** * 内容区卡片圆角(px) * @description 作用于 body 内 t-card / tea-card / 各业务 wrapper、block 容器 * @default 4 */ cardRadius?: number; /** * 底部按钮样式模式 * @description fixed-统一下按钮尺寸(高 36px、最小宽 92px、加粗中号字); * auto-不约束按钮尺寸,仅保留按钮间距 * @default 'fixed' */ footerButton?: 'fixed' | 'auto'; /** * 底部内容 * @description 传入后将渲染 Layout Footer 区域,常用于放置操作按钮 */ footer?: ReactNode; } /** * 通用页面布局组件(L3 布局组件) * @description 提供标准的「头部 + 子头部 + 内容区 + 底部」页面布局结构, * 基于 TDesign Layout(flex column)封装,内容区自动填满剩余高度, * 适用于后台管理系统的列表页、详情页、表单页等场景。 * * @example * ```tsx * // 基础用法:仅内容区 * *
页面内容
*
* * // 带标题和操作按钮 * } * > *
* * * // 带返回按钮和底部 * history.back()} * footer={<>} * > * * * * // 全出血内容区(无头部边线、内容无左右内边距、底部按钮不强制尺寸) * * ``` */ declare const PntGeneralLayout: FunctionComponent; export default PntGeneralLayout;