export const configureOptionsFieldConfigMap = { key: { type: 'input', label: '字段标识', limit: 50 }, otherKey: { type: 'input', label: '其他字段标识', limit: 50 }, extraKey: { type: 'input', label: '额外字段标识', limit: 50 }, label: { type: 'input', label: '标题', limit: 20 }, labelPosition: { type: 'radio', label: '标签对齐方式', options: [ { label: '左对齐', value: 'left' }, { label: '右对齐', value: 'right' }, { label: '顶部对齐', value: 'top' } ], isButton: true, defaultValue: 'right' }, isMainField: { type: 'switch', label: '是否为主要字段', description: '该项设置用于表单作为一个组件被引入时列表的主要信息' }, description: { type: 'textarea', label: '字段说明', limit: 200 }, hideLabel: { type: 'switch', label: '是否隐藏标题' }, hideItem: { type: 'switch', label: '是否隐藏此项' }, width: { type: 'input', label: '宽度', defaultValue: '100%', limit: 10 }, labelWidth: { // 配置由插槽实现 type: 'number', label: '标签宽度', step: 10 }, placeholder: { type: 'input', label: '占位内容', limit: 200 }, defaultValue: { type: 'input', label: '默认值' }, limit: { type: 'number', label: '长度限制' }, required: { label: '校验', type: 'singleCheckbox', option: { value: true, label: '必填' } }, requiredErrorMessage: { label: '', type: 'input', placeholder: '自定义错误提示', dependOn: ['required'], readable: false, changeConfig: (config, { required }) => { if (required) config.writable = true return config }, limit: 20 }, validateValue: {}, validateValueErrorMessage: { label: '', type: 'input', placeholder: '自定义错误提示', dependOn: ['validateValue'], readable: false, changeConfig: (config, { validateValue }) => { if (validateValue) config.writable = true return config }, limit: 20 }, regexpValidate: {}, regexpValidateErrorMessage: { label: '', type: 'input', placeholder: '自定义错误提示', dependOn: ['regexpValidate'], readable: false, changeConfig: (config, { regexpValidate }) => { if (regexpValidate) config.writable = true return config }, limit: 20 } } export const basicInputConfigureOptions = () => { return { key: {}, label: {}, // labelPosition: {}, //暂不开启组件自定义label对其方式 description: {}, hideLabel: {}, hideItem: {}, width: {}, labelWidth: {} } } export const basicTwoInputConfigureOptions = () => { return { key: {}, otherKey: {}, label: {}, description: {}, isMainField: {}, hideLabel: {}, hideItem: {}, width: {}, labelWidth: {} } } // input文件夹内无configure.js的配置文件使用此默认options export const defaultConfigureOptions = () => ({ ...basicInputConfigureOptions(), required: {}, requiredErrorMessage: {}, validateValue: {}, validateValueErrorMessage: {}, regexpValidate: {}, regexpValidateErrorMessage: {} })