mirror of
https://github.com/nocobase/nocobase.git
synced 2026-08-30 16:56:07 +08:00
fix: pop up errors after save as template (#6840)
This commit is contained in:
@@ -190,6 +190,9 @@ function cleanSchema(schema?: any) {
|
||||
if (schema.properties[key]['x-component'] == null && shouldDeleteNoComponentSchema(schema.properties[key])) {
|
||||
delete schema.properties[key];
|
||||
}
|
||||
if (properties[key]?.['x-component-props'] === null) {
|
||||
delete properties[key]['x-component-props'];
|
||||
}
|
||||
// 如果x-component是Grid.Row,且内部无任何内容,则删除
|
||||
if (properties[key]?.['x-component'] === 'Grid.Row') {
|
||||
let hasProperties = false;
|
||||
|
||||
@@ -400,6 +400,9 @@ export function cleanSchema(schema?: Schema, templateId?: string) {
|
||||
if (schema.properties[key]['x-template-root-uid'] && schema.properties[key]['x-template-root-uid'] !== templateId) {
|
||||
continue;
|
||||
}
|
||||
if (properties[key]?.['x-component-props'] === null) {
|
||||
delete properties[key]['x-component-props'];
|
||||
}
|
||||
if (properties[key]?.['x-component'] === 'Grid.Row') {
|
||||
let hasProperties = false;
|
||||
const cols = Object.values(properties[key]?.['properties'] || {});
|
||||
|
||||
Reference in New Issue
Block a user