import { InputNumber, SelectOption } from "../model/common-type"; export declare class HdTableColumn { title: string; name: string | Function; render?: (value: any) => string; width?: number; /** * 文字颜色。 * 字符串:整列同色; * 函数:按行返回颜色(如标红返回 '#F5222D',不标色返回空)。 */ color?: string | ((line: any) => string); align?: "right" | "left" | "center"; click?: (value: any) => void; /** 按行控制是否渲染为可点击超链接;未配置时只要有 click 则整列可点 */ canClick?: (value: any) => boolean; fixed?: "left" | "right"; fixedWidth?: number; fixedRightWidth?: number; btnList?: Array; isShow?: boolean; canSort?: boolean; canWarp?: boolean; minWidth?: number; stateField?: string; isState?: boolean; /** * 字段值后用竖线追加行号。前面的字段仍可配 click 作为超链接,行号本身不可点。 * true:按分页连续序号(从 1 开始); * string:取当前行该字段作为行号。 */ rowNo?: boolean | string; /** * 值后显示编辑笔图标(Figma edit/edit,14px)。 * true:整列可编辑;函数:按行控制。 * 与 editType 互斥:配置了 editType 时走单元格内控件,不再显示编辑笔。 */ editable?: boolean | ((line: any) => boolean); /** 点击编辑笔回调,供父组件处理(如弹窗改值) */ edit?: (line: any) => void; /** * 行内编辑类型;配置后该列常显控件。 * name 须为 string(函数型 name 不支持行内编辑)。 */ editType?: "input" | "inputNumber" | "select"; /** 是否禁用行内编辑:true / 按行函数 */ editDisabled?: boolean | ((line: any) => boolean); /** Select 配置(复用 SelectOption 子集) */ selectOption?: SelectOption; /** InputNumber 配置 */ inputNumber?: InputNumber; /** 输入框 / 下拉 placeholder */ placeholder?: string; } /** hd-table 行内编辑变更事件(乐观更新后抛出,previous* 供接口失败回滚) */ export declare class HdTableCellChange { line: any; col: HdTableColumn; name: string; value: any; previousValue: any; label?: any; previousLabel?: any; option?: any; previousOption?: any; } export declare class OperateBtn { /** 按钮文案;支持按行动态,如 (line) => line.enabled ? '解除' : '设置' */ name: string | ((line: any) => string); showConfirm?: boolean | ((line: any) => boolean); isRepeat?: boolean; click?: (value: any) => void; permission?: (value: any) => boolean; } export declare class TableCacheOption { pageSize: number; colWidths: Map; cols: Array; } export declare class TreeGrid { title: string; key: string; disabled?: boolean; checked?: boolean; selectable?: boolean; isLeaf?: boolean; expanded?: boolean; }