import { default as React } from 'react'; import { TActionButton } from '../ActionButton'; export type TColumn = { key: string; title: string; dataIndex: string; render?: (value: any, record: any, index: number, editable: boolean) => React.ReactNode; }; export type TObjectTable = { record: { [key: string]: any; }; editable?: boolean; columns?: TColumn[]; className?: string; actionButtonProps?: TActionButton; }; /** * ObjectTable 組件 * * @description 將對象數據以表格形式垂直展示的組件,支持可編輯模式 * * @param {object} record - 要顯示的數據對象 * @param {Array} [columns] - 自定義列配置,如果未提供則根據 record 自動生成 * @param {boolean} [editable=false] - 是否啟用編輯模式 * @param {Function} [onSave] - 編輯保存時的回調函數 * @param {string} [className] - 表格的自定義 CSS 類名 * @param {object} [buttonProps] - 操作按鈕的屬性配置 * @param {Function} [valueStringify] - 自定義值格式化函數 * * @returns {JSX.Element} 返回垂直佈局的表格組件 * * @example * // 基本用法 * * * // 可編輯模式 * console.log(values)} * /> * * // 自定義列 * */ export declare const ObjectTable: React.NamedExoticComponent;