Merge branch 'next' into develop

This commit is contained in:
nocobase[bot] 2025-04-28 11:28:02 +00:00
commit 94d4f1f8fe

View File

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