refactor: availableTypes

This commit is contained in:
katherinehhh 2024-01-17 22:14:37 +08:00
parent 343f057748
commit 1ea0995f71

View File

@ -188,6 +188,7 @@ export const oho: IField = {
title: '{{t("One to one (has one)")}}',
description: '{{t("One to one description")}}',
isAssociation: true,
availableTypes: ['hasOne'],
default: {
type: 'hasOne',
// name,
@ -391,6 +392,7 @@ export const obo: IField = {
},
},
},
availableTypes: ['belongsTo'],
schemaInitialize(schema: ISchema, { field, block, readPretty, action, targetCollection }) {
// schema['type'] = 'object';
if (['Table', 'Kanban'].includes(block)) {