From b1caa1a17b25f95d8f28c2aaabf5aafa2d25c759 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Sat, 12 Nov 2022 16:52:02 +0800 Subject: [PATCH] perf: vxe --- .../src/hooks/web/useVxeCrudSchemas.ts | 7 ++----- .../src/views/system/errorCode/index.vue | 13 ------------- yudao-ui-admin-vue3/src/views/system/post/index.vue | 3 --- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts index d37245156..59c68903f 100644 --- a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts +++ b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts @@ -104,8 +104,8 @@ export const useVxeCrudSchemas = ( // 过滤 Search 结构 const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => { - const searchSchema: VxeFormItemProps[] = [] const { t } = useI18n() + const searchSchema: VxeFormItemProps[] = [] eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => { // 判断是否显示 if (schemaItem?.search?.show) { @@ -132,14 +132,11 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => { const searchSchemaItem = { // 默认为 input folding: searchSchema.length > 2, - itemRender: itemRender, - ...schemaItem.search, + itemRender: schemaItem.itemRender ? schemaItem.itemRender : itemRender, field: schemaItem.field, title: schemaItem.search?.title || schemaItem.title, span: 8 } - // 删除不必要的字段 - delete searchSchemaItem.show searchSchema.push(searchSchemaItem) } diff --git a/yudao-ui-admin-vue3/src/views/system/errorCode/index.vue b/yudao-ui-admin-vue3/src/views/system/errorCode/index.vue index 6df7499cf..2df9f5036 100644 --- a/yudao-ui-admin-vue3/src/views/system/errorCode/index.vue +++ b/yudao-ui-admin-vue3/src/views/system/errorCode/index.vue @@ -10,18 +10,6 @@ @click="handleCreate()" /> - - -