import type { FormItemRule } from 'element-plus'; export interface ButtonInfo { key: string; label: string; tag: 'button' | 'popconfirm'; title?: string; icon?: string; handler: (p?: any) => any; [key: string]: any; } export interface FieldInfo { prop?: string; label?: string; } export interface TableColumnInfo extends FieldInfo { key?: string | number; type?: string; scopedSlots?: string | { default: string; header: string; } | any; dictFormatKey?: string; [key: string]: any; } export type InputType = 'cascader' | 'select' | 'select-v2' | 'tree-select' | 'checkbox' | 'checkbox-group' | 'radio' | 'radio-group' | 'switch' | 'date-picker' | 'time-picker' | 'time-select' | 'color-picker' | 'rate' | 'slider' | 'input-number' | 'input' | ''; export interface InputTypeInfo { tag: InputType; tooltip?: string; [key: string]: any; } export interface FormItemExtraInfo { labelTooltip?: string; notModifiable?: boolean; span?: 6 | 8 | 12 | 16 | 24; collapse?: { name?: string; title?: string; }; isError?: boolean; props?: FormItemInfo[]; } export interface FormItemInfo extends FieldInfo { labelWidth?: string | number; required?: boolean; rules?: FormItemRule | FormItemRule[]; error?: string; showMessage?: boolean; inlineMessage?: boolean; size?: 'large' | 'default' | 'small'; inputType?: InputType | InputTypeInfo; scopedSlot?: string; extra?: FormItemExtraInfo; } export interface Pagination { currentPage: number; pageSize: number; pageSizes: number[]; total: number; layout: string | 'total, sizes, prev, pager, next, jumper'; small?: boolean; background?: boolean; disabled?: boolean; } export interface Dict { label: string; value: string; children?: Dict[]; } export interface RS { code: number; msg: string; data: T; [key: string]: any; }