Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
尝试使用 Vue Formulate 生成基于模式的动态表单。我遇到的问题是,如果我的架构中有两个相同的元素,我会收到检测到重复键的错误。是否可以将索引指定为键?或者有没有办法可以将 ID 合并到我的架构中以避免此错误?提前致谢。
不清楚这是否是您的问题,但我发现架构中的非表单元素,例如 a <component>,h3或<div>经常产生此错误,但可以在架构中添加“key”属性来修复它,例如:
<component>
h3
<div>
[ { "component": "h3", "key": "h3", "children": "Sample Text", "class": "m-image-request-form__h3" }, ]