fix: print Params

This commit is contained in:
xingyu4j
2022-11-07 14:58:53 +08:00
parent 4bc7645850
commit efb4cf0c66
4 changed files with 27 additions and 12 deletions

View File

@ -18,7 +18,7 @@ export type VxeCrudSchema = Omit<VxeTableColumn, 'children'> & {
table?: CrudTableParams
form?: CrudFormParams
detail?: CrudDescriptionsParams
print?: boolean
print?: CrudPrintParams
children?: VxeCrudSchema[]
dictType?: string
}
@ -42,6 +42,11 @@ type CrudDescriptionsParams = {
show?: boolean
} & Omit<DescriptionsSchema, 'field'>
type CrudPrintParams = {
// 是否显示表单项
show?: boolean
} & Omit<VxeTableDefines.ColumnInfo[], 'field'>
interface VxeAllSchemas {
searchSchema: VxeFormItemProps[]
tableSchema: VxeGridPropTypes.Columns
@ -233,7 +238,7 @@ const filterPrintSchema = (crudSchema: VxeCrudSchema[]): any[] => {
eachTree(crudSchema, (schemaItem: VxeCrudSchema) => {
// 判断是否显示
if (schemaItem?.detail?.show !== false) {
if (schemaItem?.print?.show !== false) {
const printSchemaItem = {
field: schemaItem.field
}