perf: vxe

This commit is contained in:
xingyu4j
2022-11-12 17:33:48 +08:00
parent 16b3e910e4
commit 199d3ebb69
6 changed files with 22 additions and 25 deletions

View File

@ -165,6 +165,7 @@ const filterTableSchema = (crudSchema: VxeCrudSchema): VxeGridPropTypes.Columns
field: schemaItem.field,
title: schemaItem.table?.title || schemaItem.title
}
tableSchemaItem.showOverflow = 'tooltip'
if (schemaItem?.formatter) {
tableSchemaItem.formatter = schemaItem.formatter
}
@ -240,6 +241,15 @@ const filterDescriptionsSchema = (crudSchema: VxeCrudSchema): DescriptionsSchema
field: schemaItem.field,
label: schemaItem.detail?.label || schemaItem.title
}
if (schemaItem.dictType) {
descriptionsSchemaItem.dictType = schemaItem.dictType
}
if (schemaItem.detail?.dateFormat || schemaItem.formatter == 'formatDate') {
// descriptionsSchemaItem.dateFormat = schemaItem.detail.dateFormat
// ? schemaItem?.detail?.dateFormat
// : 'YYYY-MM-DD HH:mm:ss'
descriptionsSchemaItem.dateFormat = 'YYYY-MM-DD HH:mm:ss'
}
descriptionsSchema.push(descriptionsSchemaItem)
}

View File

@ -43,10 +43,6 @@ export const useVxeGrid = <T = any>(config?: UseVxeGridConfig<T>) => {
isCurrent: true, // 当鼠标点击行时,是否要高亮当前行
isHover: true // 当鼠标移到行时,是否要高亮当前行
},
showOverflow: 'tooltip', // 当内容溢出时显示为省略号
tooltipConfig: {
showAll: true // 开启全表工具提示
},
toolbarConfig: {
custom: true,
slots: { buttons: 'toolbar_buttons' }