Closed lixindada closed 4 months ago
fix: 之前这块其实并没有过滤掉search.hidden等于true的字段,导致设置了showExpand参数 会把index在expandField之前不应该显示出来的field也显示出来了 修改 useCrudSchemas.ts if (schemaItem.search?.hidden === true) { continue } // 过滤 Search 结构 const filterSearchSchema = (crudSchema: CrudSchema[]): FormSchema[] => { const searchSchema: FormSchema[] = [] const length = crudSchema.length
useCrudSchemas.ts if (schemaItem.search?.hidden === true) { continue }
for (let i = 0; i < length; i++) { const schemaItem = crudSchema[i] if (schemaItem.search?.hidden === true) { continue } // 判断是否隐藏 const searchSchemaItem = { component: schemaItem?.search?.component || 'Input', ...schemaItem.search, field: schemaItem.field, label: schemaItem.search?.label || schemaItem.label }
searchSchema.push(searchSchemaItem)
} return searchSchema }
fix: 之前这块其实并没有过滤掉search.hidden等于true的字段,导致设置了showExpand参数 会把index在expandField之前不应该显示出来的field也显示出来了 修改
useCrudSchemas.ts if (schemaItem.search?.hidden === true) { continue }
// 过滤 Search 结构 const filterSearchSchema = (crudSchema: CrudSchema[]): FormSchema[] => { const searchSchema: FormSchema[] = [] const length = crudSchema.lengthfor (let i = 0; i < length; i++) { const schemaItem = crudSchema[i] if (schemaItem.search?.hidden === true) { continue } // 判断是否隐藏 const searchSchemaItem = { component: schemaItem?.search?.component || 'Input', ...schemaItem.search, field: schemaItem.field, label: schemaItem.search?.label || schemaItem.label }
} return searchSchema }