例如,假设我有这样的架构:
class ComponentSchema{};
ComponentSchema.schema = {
name: 'Component',
properties: {
jsx: 'What goes here?'
}
}
class ContainerSchema{};
ContainerSchema.schema = {
name: 'JSXComponents',
properties: {
components: {type: 'list', objectType: 'Component'}
}
}
有没有办法将组件推送到JSXComponents.components
列表中,以便它可以存储代表的内容:
{0: {jsx: <Component/>}, 1: {jsx: <OtherComponent/>}}
如果JSX组件没有特定的数据类型,是否可能有解决方法?