Merge branch 'main' into next

This commit is contained in:
nocobase[bot] 2025-03-19 13:01:51 +00:00
commit 06696e653e

View File

@ -985,12 +985,11 @@ function useFormItemCollectionField() {
export function useIsAssociationField() { export function useIsAssociationField() {
const collectionField = useFormItemCollectionField(); const collectionField = useFormItemCollectionField();
const isAssociationField = ['obo', 'oho', 'o2o', 'o2m', 'm2m', 'm2o', 'updatedBy', 'createdBy', 'mbm'].includes( const isAssociationField =
collectionField?.interface, collectionField &&
); ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany', 'belongsToArray'].includes(collectionField.type);
return isAssociationField; return isAssociationField;
} }
export function useIsFileField() { export function useIsFileField() {
const cm = useCollectionManager(); const cm = useCollectionManager();
const collectionField = useFormItemCollectionField(); const collectionField = useFormItemCollectionField();