mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
aaef833be5
@ -1 +0,0 @@
|
|||||||
Subproject commit 7070b7ea1c0a10197c17e93ab079476813c36616
|
|
@ -105,8 +105,7 @@ function getFilteredFormValues(form) {
|
|||||||
allFields.push(field);
|
allFields.push(field);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const readonlyPaths = _.uniq(
|
const readonlyPaths = allFields
|
||||||
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 || [];
|
||||||
@ -114,14 +113,11 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user