Commit 22748c5aa841632e4a4cd8b3030bdfa14e46befa
1 parent
fdfdd823
fix: crud
Showing
2 changed files
with
5 additions
and
5 deletions
yudao-ui-admin-vue3/src/hooks/web/useCrudSchemas.ts
| ... | ... | @@ -120,7 +120,7 @@ const filterSearchSchema = (crudSchema: CrudSchema[]): FormSchema[] => { |
| 120 | 120 | const filterTableSchema = (crudSchema: CrudSchema[]): TableColumn[] => { |
| 121 | 121 | const tableColumns = treeMap<CrudSchema>(crudSchema, { |
| 122 | 122 | conversion: (schema: CrudSchema) => { |
| 123 | - if (schema?.isTable !== false || schema?.table?.show !== false) { | |
| 123 | + if (schema?.isTable !== false && schema?.table?.show !== false) { | |
| 124 | 124 | return { |
| 125 | 125 | ...schema.table, |
| 126 | 126 | ...schema |
| ... | ... | @@ -144,7 +144,7 @@ const filterFormSchema = (crudSchema: CrudSchema[]): FormSchema[] => { |
| 144 | 144 | |
| 145 | 145 | eachTree(crudSchema, (schemaItem: CrudSchema) => { |
| 146 | 146 | // 判断是否显示 |
| 147 | - if (schemaItem?.isForm !== false || schemaItem?.form?.show == true) { | |
| 147 | + if (schemaItem?.isForm !== false && schemaItem?.form?.show !== false) { | |
| 148 | 148 | let component = schemaItem?.form?.component || 'Input' |
| 149 | 149 | let defaultValue: any = '' |
| 150 | 150 | if (schemaItem.form?.value) { |
| ... | ... | @@ -201,7 +201,7 @@ const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[ |
| 201 | 201 | |
| 202 | 202 | eachTree(crudSchema, (schemaItem: CrudSchema) => { |
| 203 | 203 | // 判断是否显示 |
| 204 | - if (schemaItem?.isDetail !== false || schemaItem.detail?.show !== false) { | |
| 204 | + if (schemaItem?.isDetail !== false && schemaItem.detail?.show !== false) { | |
| 205 | 205 | const descriptionsSchemaItem = { |
| 206 | 206 | ...schemaItem.detail, |
| 207 | 207 | field: schemaItem.field, | ... | ... |
yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts
| ... | ... | @@ -233,7 +233,7 @@ const filterFormSchema = (crudSchema: VxeCrudSchema): FormSchema[] => { |
| 233 | 233 | |
| 234 | 234 | eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => { |
| 235 | 235 | // 判断是否显示 |
| 236 | - if (schemaItem?.isForm !== false || schemaItem?.form?.show == true) { | |
| 236 | + if (schemaItem?.isForm !== false && schemaItem?.form?.show !== false) { | |
| 237 | 237 | // 默认为 input |
| 238 | 238 | let component = schemaItem?.form?.component || 'Input' |
| 239 | 239 | let defaultValue: any = '' |
| ... | ... | @@ -287,7 +287,7 @@ const filterDescriptionsSchema = (crudSchema: VxeCrudSchema): DescriptionsSchema |
| 287 | 287 | |
| 288 | 288 | eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => { |
| 289 | 289 | // 判断是否显示 |
| 290 | - if (schemaItem?.isDetail !== false || schemaItem.detail?.show !== false) { | |
| 290 | + if (schemaItem?.isDetail !== false && schemaItem.detail?.show !== false) { | |
| 291 | 291 | const descriptionsSchemaItem = { |
| 292 | 292 | ...schemaItem.detail, |
| 293 | 293 | field: schemaItem.field, | ... | ... |