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
cfbd0d6fbb
@ -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,10 +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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user