import type { FieldMapToTime, FormSchema } from './types/form'; import type { PropType } from 'vue'; import type { ColEx } from './types'; export const basicProps = { // 标签宽度 固定宽度 labelWidth: { type: [Number, String] as PropType, default: 0, }, fieldMapToTime: { type: Array as PropType, default: () => [], }, compact: Boolean as PropType, // 表单配置规则 schemas: { type: [Array] as PropType, default: () => [], required: true, }, mergeDynamicData: { type: Object as PropType, default: null, }, baseColProps: { type: Object as PropType, }, autoSetPlaceHolder: { type: Boolean, default: true, }, size: { type: String as PropType<'default' | 'small' | 'large'>, default: 'default', }, // 禁用表单 disabled: Boolean as PropType, emptySpan: { type: [Number, Object] as PropType, default: 0, }, // 是否显示收起展开按钮 showAdvancedButton: { type: Boolean as PropType, default: false }, // 转化时间 transformDateFunc: { type: Function as PropType, default: (date: any) => { return date._isAMomentObject ? date.format('YYYY-MM-DD HH:mm:ss') : date; }, }, rulesMessageJoinLabel: { type: Boolean, default: true, }, // 超过3行自动折叠 autoAdvancedLine: { type: Number as PropType, default: 3, }, // 是否显示操作按钮 showActionButtonGroup: { type: Boolean as PropType, default: true, }, // 操作列Col配置 actionColOptions: Object as PropType, // 显示重置按钮 showResetButton: { type: Boolean as PropType, default: true, }, // 重置按钮配置 resetButtonOptions: Object as PropType, // 显示确认按钮 showSubmitButton: { type: Boolean as PropType, default: true, }, // 确认按钮配置 submitButtonOptions: Object as PropType, // 自定义重置函数 resetFunc: Function as PropType, submitFunc: Function as PropType, // 以下为默认props hideRequiredMark: Boolean as PropType, labelCol: Object as PropType, layout: { type: String as PropType<'horizontal' | 'vertical' | 'inline'>, default: 'horizontal', }, wrapperCol: Object as PropType, colon: { type: Boolean as PropType, default: false, }, labelAlign: String as PropType, };