UNPKG

@wufengteam/wform

Version:

@wufengteam/wform

201 lines 4.87 kB
import { getTodoActionListByKey } from '../utils'; import { PROPS_FOR_PC } from '../utils/constant'; export default { type: 'CheckUpload', icon: 'Upload', label: '附件校验', groupsName: '专属组件', compType: 2, platform: 'pc', props: { name: '附件校验', action: '', defaultUploadList: [], defaultSort: 'oldFirst', withCredentials: true, isView: false }, engineApi: ['customEngineApi.checkFileTypeRunning'], todoProps: { isView: { label: '是否是子表单', type: 'Input', props: { dependProps: { noShow: true } } }, labelCol: { label: '标题占比', type: 'FormItemLabel', groupsName: '基础', props: { dependProps: { noShow: true } } }, wrapperCol: { label: '标题占比', type: 'FormItemLabel', groupsName: '基础', props: { dependProps: { noShow: true } } }, // 解决复制黏贴报 [组件属性]: 单行文本组件不可配置额外的fieldName字段。 fieldName: { label: '字段编码', type: 'Input', props: { dependProps: { noShow: true } } }, name: { type: 'Input', label: '标题', groupsName: '基础', props: { label: '字段说明', defaultValue: '附件', maxLength: 20, showCount: true } }, fieldNameAlias: { label: '字段编码', type: 'FieldNameAlias', groupsName: '基础', props: { required: true, tooltipText: '编码仅支持字母、数字、下划线,不能都是数字,不能都是下划线,必须是字母开头,但不能以sys开头,不能是数据库关键字' } }, sort: { type: 'radio', label: '排序', groupsName: '基础', props: { options: [{ label: '新的在前', value: 'newFirst' }, { label: '旧的在前', value: 'oldFirst' }], label: '排序', defaultValue: 'oldFirst', optionType: 'button' } }, required: { label: '必填', type: 'Switch', groupsName: '校验', istodoBind: false, props: { defaultValue: false } }, inputVerify: { type: 'verifyNumberValue', label: '验证', groupsName: '基础', props: { options: [ // { label: '必填', value: 'require' }, { label: '限制文件数量', value: 'limitFileNum' }, { label: '限制单个文件大小', value: 'limitFileSize', title: '限制单个文件的大小' }], label: '验证', showFileNumKey: 'limitFileNum', showFileSizeKey: 'limitFileSize' } }, fieldAttr: { type: 'fieldAttr', label: '字段属性', groupsName: '基础', props: { options: [{ label: '只读', value: 'read', title: '该字段将显示在新增表单数据页面中,但用户不可编辑' } // { label: '隐藏', value: 'hide', title: '隐藏模式' }, // { label: '新增记录时隐藏', value: 'addHide', title: '新增记录隐藏模式' }, ], label: '字段属性' } }, titleTip: { label: '标题提示', type: 'RadioButton', groupsName: PROPS_FOR_PC, props: { options: [{ title: '无', value: 'notext' }, { title: '文本', value: 'text' }], defaultValue: 'notext' } }, tipIcon: { label: '提示图标', type: 'ChooseIcon', groupsName: PROPS_FOR_PC, props: { visibleFlag: 'titleTip', visibleFlagValue: ['text'], tabs: ['常用图标', '线框风格', '实底风格'] } }, tipLocation: { label: '提示位置', type: 'RadioButton', groupsName: PROPS_FOR_PC, props: { options: [{ title: '标题前', value: 'before' }, { title: '标题后', value: 'after' }], defaultValue: 'after', visibleFlag: 'titleTip', visibleFlagValue: ['text'] } }, tipContent: { label: '提示内容', type: 'Input', groupsName: PROPS_FOR_PC, props: { visibleFlag: 'titleTip', visibleFlagValue: ['text'] } }, selfSpan: { label: '列占比', type: 'ColSpan', groupsName: PROPS_FOR_PC, istodoBind: false } }, // 控制函数里-上下文是否可选到该组件 PC端-getValue H5端-value todoActionList: getTodoActionListByKey(['getValue']) };