fix: #276
This commit is contained in:
parent
8dbeaeca3a
commit
6fbc2b0243
|
@ -79,7 +79,7 @@ const filterSearchSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
const schemaItem = crudSchema[i]
|
const schemaItem = crudSchema[i]
|
||||||
// 判断是否隐藏
|
// 判断是否隐藏
|
||||||
if (!schemaItem?.search?.hidden) {
|
if (!schemaItem?.search?.remove) {
|
||||||
const searchSchemaItem = {
|
const searchSchemaItem = {
|
||||||
component: schemaItem?.search?.component || 'Input',
|
component: schemaItem?.search?.component || 'Input',
|
||||||
...schemaItem.search,
|
...schemaItem.search,
|
||||||
|
@ -87,9 +87,6 @@ const filterSearchSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
|
||||||
label: schemaItem.search?.label || schemaItem.label
|
label: schemaItem.search?.label || schemaItem.label
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除不必要的字段
|
|
||||||
delete searchSchemaItem.hidden
|
|
||||||
|
|
||||||
searchSchema.push(searchSchemaItem)
|
searchSchema.push(searchSchemaItem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,7 +124,7 @@ const filterFormSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
const formItem = crudSchema[i]
|
const formItem = crudSchema[i]
|
||||||
// 判断是否隐藏
|
// 判断是否隐藏
|
||||||
if (!formItem?.form?.hidden) {
|
if (!formItem?.form?.remove) {
|
||||||
const formSchemaItem = {
|
const formSchemaItem = {
|
||||||
component: formItem?.form?.component || 'Input',
|
component: formItem?.form?.component || 'Input',
|
||||||
...formItem.form,
|
...formItem.form,
|
||||||
|
@ -135,9 +132,6 @@ const filterFormSchema = (crudSchema: CrudSchema[]): FormSchema[] => {
|
||||||
label: formItem.form?.label || formItem.label
|
label: formItem.form?.label || formItem.label
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除不必要的字段
|
|
||||||
delete formSchemaItem.hidden
|
|
||||||
|
|
||||||
formSchema.push(formSchemaItem)
|
formSchema.push(formSchemaItem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue