fix: crud
parent
fdfdd823a6
commit
22748c5aa8
|
@ -120,7 +120,7 @@ const filterSearchSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
|
||||||
const filterTableSchema = (crudSchema: CrudSchema[]): TableColumn[] => {
|
const filterTableSchema = (crudSchema: CrudSchema[]): TableColumn[] => {
|
||||||
const tableColumns = treeMap<CrudSchema>(crudSchema, {
|
const tableColumns = treeMap<CrudSchema>(crudSchema, {
|
||||||
conversion: (schema: CrudSchema) => {
|
conversion: (schema: CrudSchema) => {
|
||||||
if (schema?.isTable !== false || schema?.table?.show !== false) {
|
if (schema?.isTable !== false && schema?.table?.show !== false) {
|
||||||
return {
|
return {
|
||||||
...schema.table,
|
...schema.table,
|
||||||
...schema
|
...schema
|
||||||
|
@ -144,7 +144,7 @@ const filterFormSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
|
||||||
|
|
||||||
eachTree(crudSchema, (schemaItem: CrudSchema) => {
|
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 component = schemaItem?.form?.component || 'Input'
|
||||||
let defaultValue: any = ''
|
let defaultValue: any = ''
|
||||||
if (schemaItem.form?.value) {
|
if (schemaItem.form?.value) {
|
||||||
|
@ -201,7 +201,7 @@ const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[
|
||||||
|
|
||||||
eachTree(crudSchema, (schemaItem: CrudSchema) => {
|
eachTree(crudSchema, (schemaItem: CrudSchema) => {
|
||||||
// 判断是否显示
|
// 判断是否显示
|
||||||
if (schemaItem?.isDetail !== false || schemaItem.detail?.show !== false) {
|
if (schemaItem?.isDetail !== false && schemaItem.detail?.show !== false) {
|
||||||
const descriptionsSchemaItem = {
|
const descriptionsSchemaItem = {
|
||||||
...schemaItem.detail,
|
...schemaItem.detail,
|
||||||
field: schemaItem.field,
|
field: schemaItem.field,
|
||||||
|
|
|
@ -233,7 +233,7 @@ const filterFormSchema = (crudSchema: VxeCrudSchema): FormSchema[] => {
|
||||||
|
|
||||||
eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => {
|
eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => {
|
||||||
// 判断是否显示
|
// 判断是否显示
|
||||||
if (schemaItem?.isForm !== false || schemaItem?.form?.show == true) {
|
if (schemaItem?.isForm !== false && schemaItem?.form?.show !== false) {
|
||||||
// 默认为 input
|
// 默认为 input
|
||||||
let component = schemaItem?.form?.component || 'Input'
|
let component = schemaItem?.form?.component || 'Input'
|
||||||
let defaultValue: any = ''
|
let defaultValue: any = ''
|
||||||
|
@ -287,7 +287,7 @@ const filterDescriptionsSchema = (crudSchema: VxeCrudSchema): DescriptionsSchema
|
||||||
|
|
||||||
eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => {
|
eachTree(crudSchema.columns, (schemaItem: VxeCrudColumns) => {
|
||||||
// 判断是否显示
|
// 判断是否显示
|
||||||
if (schemaItem?.isDetail !== false || schemaItem.detail?.show !== false) {
|
if (schemaItem?.isDetail !== false && schemaItem.detail?.show !== false) {
|
||||||
const descriptionsSchemaItem = {
|
const descriptionsSchemaItem = {
|
||||||
...schemaItem.detail,
|
...schemaItem.detail,
|
||||||
field: schemaItem.field,
|
field: schemaItem.field,
|
||||||
|
|
Loading…
Reference in New Issue