fix: 修复 crud 脚手架新增表单中出现错误渲染器的问题 (#9624)

This commit is contained in:
liaoxuezhi 2024-02-20 11:27:12 +08:00 committed by GitHub
parent 85995ded15
commit 9b5d0fda9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -812,14 +812,19 @@ export class CRUDPlugin extends BasePlugin {
api: valueSchema.api?.method?.match(/^(post|put)$/i)
? valueSchema.api
: {...valueSchema.api, method: 'post'},
body: valueSchema.columns.map((column: ColumnItem) => {
const type = column.type;
return {
type: viewTypeToEditType(type),
name: column.name,
label: column.label
};
})
body: valueSchema.columns
.filter(
({type}: any) =>
type !== 'progress' && type !== 'operation'
)
.map((column: ColumnItem) => {
const type = column.type;
return {
type: viewTypeToEditType(type),
name: column.name,
label: column.label
};
})
};
valueSchema.headerToolbar = [createSchemaBase, 'bulkActions'];
}