import { EmopItemClass } from "../../EmopItemClass/EmopItemClass"; export class EmopFormProItemClass extends EmopItemClass { /** * 表单控件的显示值 */ alias: string; /** * 表单控件的唯一标识符 */ key: string; /** * 是否启用 */ enable?: boolean = true; /** * 是否显示 */ visible?: boolean = true; /** * 错误提示 */ errorTips?: string; /** * 校验状态 */ validateStatus?: 'success' | 'error' = undefined; /** * 校验函数,校验顺序根据数组的排列顺序依次进行,校验失败则显示当前校验步骤的错误提示 */ validate?: ({ /** * 错误提示 */ errorTips: string; /** * 校验函数 */ fn: Function; } | 'required')[]; constructor(constructorData: EmopFormProItemClass) { super(constructorData); for (const key in constructorData) { this[key] = constructorData[key]; } } }