Merge branch 'next' into develop

This commit is contained in:
nocobase[bot] 2025-04-28 10:06:26 +00:00
commit f43760061f
2 changed files with 18 additions and 13 deletions

1
my-nocobase-app Submodule

@ -0,0 +1 @@
Subproject commit 7070b7ea1c0a10197c17e93ab079476813c36616

View File

@ -105,7 +105,8 @@ function getFilteredFormValues(form) {
allFields.push(field); allFields.push(field);
} }
}); });
const readonlyPaths = allFields const readonlyPaths = _.uniq(
allFields
.filter((field) => field?.componentProps?.readOnlySubmit) .filter((field) => field?.componentProps?.readOnlySubmit)
.map((field) => { .map((field) => {
const segments = field.path?.segments || []; const segments = field.path?.segments || [];
@ -113,11 +114,14 @@ function getFilteredFormValues(form) {
return segments.join('.'); return segments.join('.');
} }
return segments.slice(0, -1).join('.'); return segments.slice(0, -1).join('.');
}); }),
for (const path of readonlyPaths) { );
readonlyPaths.forEach((path, index) => {
if (index !== 0 || path.includes('.')) {
// 清空值,但跳过第一层
_.unset(values, path); _.unset(values, path);
} }
});
return values; return values;
} }