Skip to content

content/docs/fields/{grid,location}.mdx 教的 plugin:grid / plugin:map 全仓未注册 —— 照抄即 OBJUI-001 红框 #4796

Description

@yinlianghui

发现于 #4786 的实施,真实 SchemaRenderer 探针实测。与 #4786 里已修掉的 stats-card 是同一类缺陷(教学面给了一个注册表里不存在的 type),但落在两个不同文件、且不属于 #4786props 信封范围,故单列。

实测

@@PROBE plugin:grid
text="Unknown component type: plugin:grid ... (OBJUI-001)"
@@PROBE plugin:map
text="Unknown component type: plugin:map ... (OBJUI-001)"

真实注册名

  • packages/plugin-grid/src/index.tsx:129 —— ComponentRegistry.register('object-grid', ObjectGridRenderer, ...)
  • packages/plugin-map/src/index.tsx:62 —— ComponentRegistry.register('object-map', ObjectMapRenderer, ...)

全仓 grep -rn "register('plugin:grid'\|register('plugin:map'" 零命中。

命中位置

  • content/docs/fields/grid.mdx 的 "Full Grid Functionality" 段(type: 'plugin:grid')
  • content/docs/fields/location.mdx 的 "With map visualization" 段(type: 'plugin:map')

#4786 的 PR 已把这两处的 props 信封拆掉(键提到节点上,与 object-grid / object-map 的真实读法一致),但刻意没有改 type —— 那是本单的范围。改完信封后示例仍然渲染红框,直到这里被修。

修法

两处 type 改成 object-grid / object-map,并核一遍同段落里其余键是否被对应 renderer 读(object-gridschema.objectName / schema.columns / schema.fields,见 packages/plugin-grid/src/index.tsx:155-157)。

参考

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions