mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix: bug
This commit is contained in:
parent
f9be668b49
commit
ccc981b98e
@ -17,7 +17,7 @@ import { TreeNode } from '../TreeLabel';
|
||||
// 过滤掉系统字段
|
||||
export const systemKeys = [
|
||||
// 'id',
|
||||
// 'sort',
|
||||
'sort',
|
||||
'createdById',
|
||||
'createdBy',
|
||||
'createdAt',
|
||||
@ -61,7 +61,7 @@ export const useCollectionState = (currentCollectionName: string, displayType =
|
||||
if (!field.interface) {
|
||||
return;
|
||||
}
|
||||
if (['password', 'sequence'].includes(field.type)) {
|
||||
if (depth === 0 && ['sort', 'password', 'sequence'].includes(field.type)) {
|
||||
return;
|
||||
}
|
||||
if (filterFields && filterFields(field)) {
|
||||
@ -97,7 +97,7 @@ export const useCollectionState = (currentCollectionName: string, displayType =
|
||||
depth: depth + 1,
|
||||
maxDepth,
|
||||
prefix: option.key,
|
||||
exclude: ['id', ...systemKeys],
|
||||
exclude: ['id', ...systemKeys.filter((v) => v !== 'sort')],
|
||||
});
|
||||
}
|
||||
return option;
|
||||
@ -290,7 +290,7 @@ function loadChildren({ node, traverseAssociations, traverseFields, systemKeys,
|
||||
});
|
||||
} else if (['hasOne', 'hasMany'].includes(node.field.type) || node?.type === 'duplicate') {
|
||||
children = traverseFields(node.field.target, {
|
||||
exclude: ['id', ...systemKeys],
|
||||
exclude: ['id', ...systemKeys.filter((v) => v !== 'sort')],
|
||||
prefix: node.key,
|
||||
maxDepth: 1,
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user