| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import { WidgetType, FieldType } from './commons/enums'
- /**
- * 自定义组件配置
- */
- export default [
- {
- defaultValue: '', // 如果是多选则存储的为JSON数组
- description: '单行文本测试',
- fieldType: FieldType.INTEGER,
- name: 'inputType',
- regExp: '/^\\d+$/',
- required: true,
- title: '单行文本',
- config: {
- maxLength: 180,
- }
- },
- {
- defaultValue: '',
- description: '多行文本测试',
- fieldType: FieldType.STRING,
- name: 'areaType',
- required: true,
- title: '多行文本',
- config: {
- type: WidgetType.TEXT_AREA,
- maxLength: 180
- }
- },
- {
- defaultValue: '',
- description: '下拉选择测试',
- fieldType: FieldType.STRING,
- name: 'selectType',
- required: true,
- title: '下拉选择',
- config: {
- type: WidgetType.SELECT,
- option: [{ value: 'test1', text: '测试1' }, { value: 'test2', text: '测试2' }]
- }
- },
- {
- defaultValue: '[]',
- description: '多选下拉选择测试',
- fieldType: FieldType.STRING,
- name: 'multiSelectType',
- required: true,
- title: '多选下拉选择',
- config: {
- type: WidgetType.MULTI_SELECT,
- option: [{ value: 'test1', text: '测试1' }, { value: 'test2', text: '测试2' }]
- }
- },
- {
- defaultValue: '[]',
- description: '复选框测试',
- fieldType: FieldType.STRING,
- name: 'checkboxType',
- required: true,
- title: '复选框',
- config: {
- type: WidgetType.CHECKBOX,
- option: [{ value: 'test1', text: '测试1' }, { value: 'test2', text: '测试2' }]
- }
- },
- {
- defaultValue: '',
- description: '日期选择测试',
- fieldType: FieldType.STRING,
- name: 'dateType',
- required: true,
- title: '日期选择',
- config: {
- type: WidgetType.DATE,
- content: 'YYYY-MM-DD HH:mm:ss'
- }
- }
- ]
|