fix: crud

pull/2/head
xingyu4j 2022-11-22 13:51:22 +08:00
parent fdfdd823a6
commit 22748c5aa8
2 changed files with 5 additions and 5 deletions

View File

@ -120,7 +120,7 @@ const filterSearchSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
const filterTableSchema = (crudSchema: CrudSchema[]): TableColumn[] => {
const tableColumns = treeMap<CrudSchema>(crudSchema, {
conversion: (schema: CrudSchema) => {
if (schema?.isTable !== false || schema?.table?.show !== false) {
if (schema?.isTable !== false && schema?.table?.show !== false) {
return {
...schema.table,
...schema
@ -144,7 +144,7 @@ const filterFormSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
eachTree(crudSchema, (schemaItem: CrudSchema) => {
// 判断是否显示
if (schemaItem?.isForm !== false || schemaItem?.form?.show == true) {
if (schemaItem?.isForm !== false && schemaItem?.form?.show !== false) {
let component = schemaItem?.form?.component || 'Input'
let defaultValue: any = ''
if (schemaItem.form?.value) {
@ -201,7 +201,7 @@ const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[
eachTree(crudSchema, (schemaItem: CrudSchema) => {
// 判断是否显示
if (schemaItem?.isDetail !== false || schemaItem.detail?.show !== false) {
if (schemaItem?.isDetail !== false && schemaItem.detail?.show !== false) {
const descriptionsSchemaItem = {
...schemaItem.detail,
field: schemaItem.field,

View File

@ -233,7 +233,7 @@ const filterFormSchema = (crudSchema: VxeCrudSchema): FormSchema[] => {
eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => {
// 判断是否显示
if (schemaItem?.isForm !== false || schemaItem?.form?.show == true) {
if (schemaItem?.isForm !== false && schemaItem?.form?.show !== false) {
// 默认为 input
let component = schemaItem?.form?.component || 'Input'
let defaultValue: any = ''
@ -287,7 +287,7 @@ const filterDescriptionsSchema = (crudSchema: VxeCrudSchema): DescriptionsSchema
eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => {
// 判断是否显示
if (schemaItem?.isDetail !== false || schemaItem.detail?.show !== false) {
if (schemaItem?.isDetail !== false && schemaItem.detail?.show !== false) {
const descriptionsSchemaItem = {
...schemaItem.detail,
field: schemaItem.field,