用代码访问CMS的限制
在我们的CMS更新中,某些与基于Framer内部机制构建的代码组件和覆盖功能相关的功能不再受支持。
这些更改对于提升性能、稳定性以及支持新功能(例如更大的集合)是必要的。集合变量已更新,不再是一个数组。此外,集合变量提供的属性属于私有实现细节,可能会随时变更。
以下是您在 CMS 中不能再执行的操作。
通过代码覆写访问集合
{\n // The variable below has changed and is NOT supported.\n const collection = props.children.props.query.from.data\n return \n }\n}" language="JSX" />
通过代码组件访问集合
{children}\n}\n\naddPropertyControls(Component, {\n children: {\n type: ControlType.ComponentInstance,\n },\n})" language="JSX" />
通过模块导入访问集合
这些限制确保了随着平台的发展,Framer 能保持稳健和灵活。如果您有关于如何调整组件的问题或需要指导,请随时通过我们的 联系页面 寻求进一步帮助。