export interface EmopTableHeader { /** * 当前表格头的中文显示值 */ alias: string; /** * 当前表格头的变量和唯一标识符 */ key: string; /** * 当前表格头是否可见 */ visible?: boolean; /** * 当前表格头的长度 */ width?: string; /** * 当前表格头是否启用 */ enable?: boolean; /** * 当前表格头的渲染类型 */ type?: null | 'str' | 'lov' | 'bool' | 'date' | 'num' | 'action'; /** * 排序 */ sortFn?: { /** * 排序函数 */ fn: Function; /** * 排序方向 */ directions: ('ascend' | 'descend' | null)[]; /** * 默认排序方向 */ default: ('ascend' | 'descend' | null); } | boolean; /** * 筛选 */ filterFn?: { multiple?: boolean; data: any[]; fn: Function; }; /** * 搜索 */ searchable?: boolean; /** * 当前表格头左键点击后进入的编辑模式 */ editFn?: { type?: null | 'str' | 'lov' | 'bool' | 'date' | 'num'; fn?: Function; options?: { key: string; val: string; }[]; }; /** * 表格的行操作 */ action?: { /** * 显示值 */ alias: string; /** * 绑定的函数 */ fn: Function; /** * 图标(输入iconfont类名) */ icon?: string; /** * 展示类型 * @param icon 仅展示图标 * @param string 仅展示文字 * @param both 展示图标及文字 */ type: 'icon' | 'string' | 'both'; /** * 自定义类名 */ class?: string; /** * 标识符 */ key: string; }[]; } export interface EmopTableInfoType { /** * 表格头数据 */ header: EmopTableHeader[]; /** * 表格数据 */ data?: object[]; /** * 表格加载状态 */ loading?: boolean; /** * 是否开启序号列 */ serial?: boolean; /** * 表格类型 */ type?: 'checkbox' | 'radio' | 'normal'; /** * 多选选中内容 */ checkboxSelected?: any[]; /** * 多选标识符 */ selectedTag?: string; /** * 单选选中内容 */ radioSelected?: null; /** * 分页信息 */ pageInfo?: { /** * 表格一页的大小 */ pageSize?: number; /** * 表格的页码 */ pageIndex?: number; /** * 总数量 */ totalCount?: number; }; /** * 显示分页器 */ showPagination?: boolean; /** * 是否前端分页 */ frontPagination?: boolean; /** * 表格是否有边框 */ border?: boolean; }