import { ValidationSetter, RsFunButtonSetter } from '../_setters'; import { ValidationType, DEFAULT_EDITABLE_FUN } from '@/constants'; /** * 基础校验属性 */ export default [ { name: 'editableExpression', title: { label: { type: 'i18n', zh_CN: '可编辑条件', en_US: 'Editable Expression', }, tip: { type: 'i18n', zh_CN: 'editableExpression: 可编辑条件函数 || 可编辑条件,支持函数表达式,返回值为 true 时可编辑', en_US: 'prop: editableExpression', }, }, setter: { componentName: RsFunButtonSetter, props: { defaultValue: DEFAULT_EDITABLE_FUN, header: '可编辑条件函数' } } }, { name: 'required', title: { label: { type: 'i18n', zh_CN: '必填', en_US: 'Required' }, }, setter: { componentName: ValidationSetter, }, }, { name: 'customFunction', title: { label: { type: 'i18n', zh_CN: '自定义函数', en_US: 'Custom Function' }, tip: { type: 'i18n', zh_CN: 'customFunction | 自定义函数', en_US: 'customFunction | Custom Function', }, }, propType: 'func', setter: { componentName: ValidationSetter, props: { type: ValidationType.CUSTOM_FUNCTION, }, }, }, ];