87 lines
2.1 KiB
Plaintext
87 lines
2.1 KiB
Plaintext
import type { CSSProperties, PropType } from 'vue';
|
|
import { FormSchema } from './types/form';
|
|
import type { ColEx } from './types';
|
|
import type { ButtonProps } from 'ant-design-vue/lib/button';
|
|
import { propTypes } from '@/utils/propTypes';
|
|
import type { RowProps } from 'ant-design-vue/lib/grid/Row';
|
|
export const basicProps = {
|
|
// 标签宽度 固定宽度
|
|
labelWidth: {
|
|
type: [Number, String] as PropType<number | string>,
|
|
default: 80,
|
|
},
|
|
// 表单配置规则
|
|
schemas: {
|
|
type: [Array] as PropType<FormSchema[]>,
|
|
default: () => [],
|
|
},
|
|
//布局方式
|
|
layout: {
|
|
type: String,
|
|
default: 'horizontal',
|
|
},
|
|
//操作按钮继承 LabelCol
|
|
actInheritLabelCol: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
//是否展示为行内表单
|
|
inline: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
//大小
|
|
size: {
|
|
type: String,
|
|
default: 'medium',
|
|
},
|
|
//组件是否width 100%
|
|
isFull: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
// 禁用表单
|
|
disabled: propTypes.bool,
|
|
//是否显示操作按钮(查询/重置)
|
|
showActionButtonGroup: propTypes.bool.def(true),
|
|
// 显示重置按钮
|
|
showResetButton: propTypes.bool.def(true),
|
|
//重置按钮配置
|
|
resetButtonOptions: Object as PropType<Partial<ButtonProps>>,
|
|
// 显示确认按钮
|
|
showSubmitButton: propTypes.bool.def(true),
|
|
// 确认按钮配置
|
|
submitButtonOptions: Object as PropType<Partial<ButtonProps>>,
|
|
//展开收起按钮
|
|
showAdvancedButton: propTypes.bool.def(true),
|
|
// 确认按钮文字
|
|
submitButtonText: {
|
|
type: String,
|
|
default: '查询',
|
|
},
|
|
//重置按钮文字
|
|
resetButtonText: {
|
|
type: String,
|
|
default: '重置',
|
|
},
|
|
labelCol: Object as PropType<Partial<ColEx>>,
|
|
//row 配置
|
|
rowProps: Object as PropType<Partial<RowProps>>,
|
|
//col 配置
|
|
colProps: Object as PropType<Partial<ColEx>>,
|
|
//row 样式
|
|
baseRowStyle: Object as PropType<CSSProperties>,
|
|
//操作按钮样式
|
|
actionStyle: Object as PropType<CSSProperties>,
|
|
//是否折叠
|
|
collapsed: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
//默认展示的行数
|
|
collapsedRows: {
|
|
type: Number,
|
|
default: 1,
|
|
},
|
|
};
|