export type Options = { Rules: any }; export type ItemConfig = { width?: number, // 宽度 description?: string, // 试验性,谨慎使用 label?: string, key: string, type?: string, tooltip?: string, // type为text时可用 placeholder?: string, defaultValue?: any, extra?: string, action?: string, staticView?: boolean, // disabled 或者 lock状态下是否只做数据展示 size?: 'default' | 'large' | 'small', exclusiveLine?: boolean, // 该输入域是否独占一行 fullWidth?: boolean, // 该输入域是否占表格全宽(多列布局且exclusiveLine为true时有效) validators?: Array, disabled?: boolean, call?: Function // type为code时可用 formatFn?: Function, // 处理数据 custom?: any // 优先级最高,忽略label和key之外的选项, options?: Array<{ label: any, value: any }> }; export type Config = { name?: string, layout?: any, // 'horizontal' | 'inline' | 'vertical', // 默认 vertical columns?: number, // 不推荐与layout同时使用,可能有bug lock?: boolean, // 表单锁定,优先级低于items.disabled,默认false items: Array, buttons?: Array<{ type: string, text: string, color?: string, lock?: boolean, validate?: boolean, callback?: Function }> }; export type RuleConfig = { message: string, trigger: any, // blur|change|['blur','change'] pattern: string, required?: boolean, type?: string, validator?: Function };