123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import { configMapToList } from '@cip/utils/config-util'
- import { DRender } from '@cip/components/helper/d-render'
- export const formConfigFieldConfigMap = {
- labelPosition: {
- type: 'radio',
- label: '标签对齐方式',
- options: [
- { label: '左对齐', value: 'left' },
- { label: '右对齐', value: 'right' },
- { label: '顶部对齐', value: 'top' }
- ],
- isButton: true,
- defaultValue: 'right'
- },
- labelWidth: {
- type: 'number',
- label: '表单标签宽度',
- step: 10,
- min: 0
- },
- labelSuffix: {
- type: 'switch',
- label: '是否添加表单标签后缀',
- activeValue: ':',
- inactiveValue: ' ',
- defaultValue: ':'
- },
- tableSize: {
- type: 'radio',
- label: '组件尺寸',
- options: ['medium', 'small', 'mini'],
- isButton: true,
- defaultValue: 'small'
- }
- }
- export const formConfigFieldConfigList = configMapToList(formConfigFieldConfigMap)
- const dRender = new DRender()
- export const getComponentConfigure = async (type) => {
- const { default: configure } = await dRender.componentDictionary[type]('/configure')()
- return configure
- }
|