feat(client): add hidden option to interface (#4279)

This commit is contained in:
Junyi 2024-05-09 10:35:53 +08:00 committed by GitHub
parent 68a0c96fd0
commit e67fe2038f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ export const getOptions = (
...group,
key: groupName,
children: Object.keys(fieldInterfaces[groupName] || {})
.filter((type) => !fieldInterfaces[groupName][type].hidden)
.map((type) => {
const field = fieldInterfaces[groupName][type];
return {

View File

@ -53,4 +53,5 @@ export abstract class CollectionFieldInterface {
validateSchema?(fieldSchema: ISchema): Record<string, ISchema>;
usePathOptions?(field: CollectionFieldOptions): any;
schemaInitialize?(schema: ISchema, data: any): void;
hidden?: boolean;
}

View File

@ -30,4 +30,5 @@ export class ExpressionFieldInterface extends CollectionFieldInterface {
properties = {
...defaultProps,
};
hidden = true;
}