refactor: Descriptions

This commit is contained in:
xingyu4j
2022-11-15 17:05:05 +08:00
parent cbd2815c8e
commit 70b8dcb174
24 changed files with 26 additions and 184 deletions

View File

@ -183,6 +183,14 @@ const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[
field: schemaItem.field,
label: schemaItem.detail?.label || schemaItem.label
}
if (schemaItem.dictType) {
descriptionsSchemaItem.dictType = schemaItem.dictType
}
if (schemaItem.detail?.dateFormat || schemaItem.formatter == 'formatDate') {
descriptionsSchemaItem.dateFormat = schemaItem.dateFormat
? schemaItem?.detail?.dateFormat
: 'YYYY-MM-DD HH:mm:ss'
}
// 删除不必要的字段
delete descriptionsSchemaItem.show