| ¶Ô±ÈÐÂÎļþ |
| | |
| | | export const formConf = { |
| | | formRef: 'formRef', |
| | | formModel: 'formData', |
| | | size: 'default', |
| | | labelPosition: 'right', |
| | | labelWidth: 100, |
| | | formRules: 'rules', |
| | | gutter: 15, |
| | | disabled: false, |
| | | span: 24, |
| | | formBtns: true, |
| | | } |
| | | |
| | | export const inputComponents = [ |
| | | { |
| | | label: 'åè¡ææ¬', |
| | | tag: 'el-input', |
| | | tagIcon: 'input', |
| | | type: 'text', |
| | | placeholder: '请è¾å
¥', |
| | | defaultValue: undefined, |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: { width: '100%' }, |
| | | clearable: true, |
| | | prepend: '', |
| | | append: '', |
| | | 'prefix-icon': '', |
| | | 'suffix-icon': '', |
| | | maxlength: null, |
| | | 'show-word-limit': false, |
| | | readonly: false, |
| | | disabled: false, |
| | | required: true, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/input', |
| | | }, |
| | | { |
| | | label: 'å¤è¡ææ¬', |
| | | tag: 'el-input', |
| | | tagIcon: 'textarea', |
| | | type: 'textarea', |
| | | placeholder: '请è¾å
¥', |
| | | defaultValue: undefined, |
| | | span: 24, |
| | | labelWidth: null, |
| | | autosize: { |
| | | minRows: 4, |
| | | maxRows: 4, |
| | | }, |
| | | style: { width: '100%' }, |
| | | maxlength: null, |
| | | 'show-word-limit': false, |
| | | readonly: false, |
| | | disabled: false, |
| | | required: true, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/input', |
| | | }, |
| | | { |
| | | label: 'å¯ç ', |
| | | tag: 'el-input', |
| | | tagIcon: 'password', |
| | | type: 'password', |
| | | placeholder: '请è¾å
¥', |
| | | defaultValue: undefined, |
| | | span: 24, |
| | | 'show-password': true, |
| | | labelWidth: null, |
| | | style: { width: '100%' }, |
| | | clearable: true, |
| | | prepend: '', |
| | | append: '', |
| | | 'prefix-icon': '', |
| | | 'suffix-icon': '', |
| | | maxlength: null, |
| | | 'show-word-limit': false, |
| | | readonly: false, |
| | | disabled: false, |
| | | required: true, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/input', |
| | | }, |
| | | { |
| | | label: '计æ°å¨', |
| | | tag: 'el-input-number', |
| | | tagIcon: 'number', |
| | | placeholder: '', |
| | | defaultValue: undefined, |
| | | span: 24, |
| | | labelWidth: null, |
| | | min: undefined, |
| | | max: undefined, |
| | | step: undefined, |
| | | 'step-strictly': false, |
| | | precision: undefined, |
| | | 'controls-position': '', |
| | | disabled: false, |
| | | required: true, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/input-number', |
| | | }, |
| | | ] |
| | | |
| | | export const selectComponents = [ |
| | | { |
| | | label: '䏿鿩', |
| | | tag: 'el-select', |
| | | tagIcon: 'select', |
| | | placeholder: 'è¯·éæ©', |
| | | defaultValue: undefined, |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: { width: '100%' }, |
| | | clearable: true, |
| | | disabled: false, |
| | | required: true, |
| | | filterable: false, |
| | | multiple: false, |
| | | options: [ |
| | | { |
| | | label: 'é项ä¸', |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: 'é项äº', |
| | | value: 2, |
| | | }, |
| | | ], |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/select', |
| | | }, |
| | | { |
| | | label: '级èéæ©', |
| | | tag: 'el-cascader', |
| | | tagIcon: 'cascader', |
| | | placeholder: 'è¯·éæ©', |
| | | defaultValue: [], |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: { width: '100%' }, |
| | | props: { |
| | | props: { |
| | | multiple: false, |
| | | }, |
| | | }, |
| | | 'show-all-levels': true, |
| | | disabled: false, |
| | | clearable: true, |
| | | filterable: false, |
| | | required: true, |
| | | options: [ |
| | | { |
| | | id: 1, |
| | | value: 1, |
| | | label: 'é项1', |
| | | children: [ |
| | | { |
| | | id: 2, |
| | | value: 2, |
| | | label: 'é项1-1', |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | dataType: 'dynamic', |
| | | labelKey: 'label', |
| | | valueKey: 'value', |
| | | childrenKey: 'children', |
| | | separator: '/', |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/cascader', |
| | | }, |
| | | { |
| | | label: 'åéæ¡ç»', |
| | | tag: 'el-radio-group', |
| | | tagIcon: 'radio', |
| | | defaultValue: 0, |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: {}, |
| | | optionType: 'default', |
| | | border: false, |
| | | size: 'default', |
| | | disabled: false, |
| | | required: true, |
| | | options: [ |
| | | { |
| | | label: 'é项ä¸', |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: 'é项äº', |
| | | value: 2, |
| | | }, |
| | | ], |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/radio', |
| | | }, |
| | | { |
| | | label: 'å¤éæ¡ç»', |
| | | tag: 'el-checkbox-group', |
| | | tagIcon: 'checkbox', |
| | | defaultValue: [], |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: {}, |
| | | optionType: 'default', |
| | | border: false, |
| | | size: 'default', |
| | | disabled: false, |
| | | required: true, |
| | | options: [ |
| | | { |
| | | label: 'é项ä¸', |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: 'é项äº', |
| | | value: 2, |
| | | }, |
| | | ], |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/checkbox', |
| | | }, |
| | | { |
| | | label: 'å¼å
³', |
| | | tag: 'el-switch', |
| | | tagIcon: 'switch', |
| | | defaultValue: false, |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: {}, |
| | | disabled: false, |
| | | required: true, |
| | | 'active-text': '', |
| | | 'inactive-text': '', |
| | | 'active-color': null, |
| | | 'inactive-color': null, |
| | | 'active-value': true, |
| | | 'inactive-value': false, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/switch', |
| | | }, |
| | | { |
| | | label: 'æ»å', |
| | | tag: 'el-slider', |
| | | tagIcon: 'slider', |
| | | defaultValue: null, |
| | | span: 24, |
| | | labelWidth: null, |
| | | disabled: false, |
| | | required: true, |
| | | min: 0, |
| | | max: 100, |
| | | step: 1, |
| | | 'show-stops': false, |
| | | range: false, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/slider', |
| | | }, |
| | | { |
| | | label: 'æ¶é´éæ©', |
| | | tag: 'el-time-picker', |
| | | tagIcon: 'time', |
| | | placeholder: 'è¯·éæ©', |
| | | defaultValue: '', |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: { width: '100%' }, |
| | | disabled: false, |
| | | clearable: true, |
| | | required: true, |
| | | format: 'HH:mm:ss', |
| | | 'value-format': 'HH:mm:ss', |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/time-picker', |
| | | }, |
| | | { |
| | | label: 'æ¶é´èå´', |
| | | tag: 'el-time-picker', |
| | | tagIcon: 'time-range', |
| | | defaultValue: null, |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: { width: '100%' }, |
| | | disabled: false, |
| | | clearable: true, |
| | | required: true, |
| | | 'is-range': true, |
| | | 'range-separator': 'è³', |
| | | 'start-placeholder': 'å¼å§æ¶é´', |
| | | 'end-placeholder': 'ç»ææ¶é´', |
| | | format: 'HH:mm:ss', |
| | | 'value-format': 'HH:mm:ss', |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/time-picker', |
| | | }, |
| | | { |
| | | label: 'æ¥æéæ©', |
| | | tag: 'el-date-picker', |
| | | tagIcon: 'date', |
| | | placeholder: 'è¯·éæ©', |
| | | defaultValue: null, |
| | | type: 'date', |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: { width: '100%' }, |
| | | disabled: false, |
| | | clearable: true, |
| | | required: true, |
| | | format: 'YYYY-MM-DD', |
| | | 'value-format': 'YYYY-MM-DD', |
| | | readonly: false, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/date-picker', |
| | | }, |
| | | { |
| | | label: 'æ¥æèå´', |
| | | tag: 'el-date-picker', |
| | | tagIcon: 'date-range', |
| | | defaultValue: null, |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: { width: '100%' }, |
| | | type: 'daterange', |
| | | 'range-separator': 'è³', |
| | | 'start-placeholder': 'å¼å§æ¥æ', |
| | | 'end-placeholder': 'ç»ææ¥æ', |
| | | disabled: false, |
| | | clearable: true, |
| | | required: true, |
| | | format: 'YYYY-MM-DD', |
| | | 'value-format': 'YYYY-MM-DD', |
| | | readonly: false, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/date-picker', |
| | | }, |
| | | { |
| | | label: 'è¯å', |
| | | tag: 'el-rate', |
| | | tagIcon: 'rate', |
| | | defaultValue: 0, |
| | | span: 24, |
| | | labelWidth: null, |
| | | style: {}, |
| | | max: 5, |
| | | 'allow-half': false, |
| | | 'show-text': false, |
| | | 'show-score': false, |
| | | disabled: false, |
| | | required: true, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/rate', |
| | | }, |
| | | { |
| | | label: 'é¢è²éæ©', |
| | | tag: 'el-color-picker', |
| | | tagIcon: 'color', |
| | | defaultValue: null, |
| | | labelWidth: null, |
| | | 'show-alpha': false, |
| | | 'color-format': '', |
| | | disabled: false, |
| | | required: true, |
| | | size: 'default', |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/color-picker', |
| | | }, |
| | | { |
| | | label: 'ä¸ä¼ ', |
| | | tag: 'el-upload', |
| | | tagIcon: 'upload', |
| | | action: 'https://jsonplaceholder.typicode.com/posts/', |
| | | defaultValue: null, |
| | | labelWidth: null, |
| | | disabled: false, |
| | | required: true, |
| | | accept: '', |
| | | name: 'file', |
| | | 'auto-upload': true, |
| | | showTip: false, |
| | | buttonText: 'ç¹å»ä¸ä¼ ', |
| | | fileSize: 2, |
| | | sizeUnit: 'MB', |
| | | 'list-type': 'text', |
| | | multiple: false, |
| | | regList: [], |
| | | changeTag: true, |
| | | document: 'https://element-plus.org/zh-CN/component/upload', |
| | | tip: 'åªè½ä¸ä¼ ä¸è¶
è¿ 2MB çæä»¶', |
| | | style: { width: '100%' }, |
| | | }, |
| | | ] |
| | | |
| | | export const layoutComponents = [ |
| | | { |
| | | layout: 'rowFormItem', |
| | | tagIcon: 'row', |
| | | type: 'default', |
| | | justify: 'start', |
| | | align: 'top', |
| | | label: 'è¡å®¹å¨', |
| | | layoutTree: true, |
| | | children: [], |
| | | document: 'https://element-plus.org/zh-CN/component/layout', |
| | | }, |
| | | { |
| | | layout: 'colFormItem', |
| | | label: 'æé®', |
| | | changeTag: true, |
| | | labelWidth: null, |
| | | tag: 'el-button', |
| | | tagIcon: 'button', |
| | | span: 24, |
| | | default: 'ä¸»è¦æé®', |
| | | type: 'primary', |
| | | icon: 'Search', |
| | | size: 'default', |
| | | disabled: false, |
| | | document: 'https://element-plus.org/zh-CN/component/button', |
| | | }, |
| | | ] |
| | | |
| | | // ç»ä»¶ruleçè§¦åæ¹å¼ï¼æ è§¦åæ¹å¼çç»ä»¶ä¸çærule |
| | | export const trigger = { |
| | | 'el-input': 'blur', |
| | | 'el-input-number': 'blur', |
| | | 'el-select': 'change', |
| | | 'el-radio-group': 'change', |
| | | 'el-checkbox-group': 'change', |
| | | 'el-cascader': 'change', |
| | | 'el-time-picker': 'change', |
| | | 'el-date-picker': 'change', |
| | | 'el-rate': 'change', |
| | | } |