import { Variant } from 'antd/es/config-provider'; import { SizeType } from 'antd/es/config-provider/SizeContext'; import { InputState } from '@/constants'; import { FormulaList } from './formula'; /** * 校验属性 */ export interface ValidationProps { required?: ValidationField; minLength?: ValidationField; maxLength?: ValidationField; minValue?: ValidationField; maxValue?: ValidationField; customFunction?: ValidationField; } export interface ValidationField { enabled: boolean; value?: string | number; message: string; dependencies?: string[]; } export type FormItemProps = ValidationProps & { rs_id: string; hasLabel?: boolean; label?: string; layout?: string; showTip?: boolean; tooltip?: string; formulaList?: FormulaList; editableExpression?: string; onValueChange?: (value: any) => void; }; export type SwitchValueType = '0' | '1' | '2' | '3'; /** * 通用输入组件属性 */ export interface CommonInputProps { variant?: Variant; placeholder?: string; state?: InputState; size?: SizeType; }