123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- export const configureOptionsFieldConfigMap = {
- key: {
- type: 'input',
- label: '字段标识',
- limit: 50,
- description: '修改本项将导致数据依赖失效,需要重新进行配置'
- },
- otherKey: {
- type: 'input',
- label: '其他字段标识',
- limit: 50,
- description: '修改本项将导致数据依赖失效,需要重新进行配置'
- },
- label: {
- type: 'input',
- label: '标题',
- limit: 20
- },
- span: {
- type: 'number',
- label: '占列数',
- min: 1,
- max: 24
- },
- 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: '长度限制',
- min: 0
- },
- 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
- },
- dependOn: {
- type: 'input',
- label: '数据依赖',
- description: '修改字段标识或其他字段标识将导致本项配置失效,需要重新进行配置'
- },
- changeValueStr: {
- type: 'input',
- label: '依赖数据值变动回调函数-修改值',
- description: '修改字段标识或其他字段标识将导致本项配置失效,需要重新进行配置'
- },
- changeConfigStr: {
- type: 'input',
- label: '依赖数据值变动回调函数-修改表单配置',
- description: '修改字段标识或其他字段标识将导致本项配置失效,需要重新进行配置'
- }
- }
- export const basicInputConfigureOptions = () => {
- return {
- key: {},
- label: {},
- // labelPosition: {}, //暂不开启组件自定义label对其方式
- description: {},
- hideLabel: {},
- hideItem: {},
- width: {},
- labelWidth: {},
- dependOn: {},
- changeValueStr: {},
- changeConfigStr: {}
- }
- }
- export const basicTwoInputConfigureOptions = () => {
- return {
- key: {},
- otherKey: {},
- label: {},
- description: {},
- isMainField: {},
- hideLabel: {},
- hideItem: {},
- width: {},
- labelWidth: {},
- dependOn: {},
- changeValueStr: {},
- changeConfigStr: {}
- }
- }
- // input文件夹内无configure.js的配置文件使用此默认options
- export const defaultConfigureOptions = () => ({
- ...basicInputConfigureOptions(),
- required: {},
- requiredErrorMessage: {},
- validateValue: {},
- validateValueErrorMessage: {},
- regexpValidate: {},
- regexpValidateErrorMessage: {}
- })
|