+ {Array.from(group.itemMap.entries()).map(([type, ids]) => {
+ if (ids.length > 0) {
+ return (
+
+
{type === 'CodeSample' ? '代码样例' : '代码上下文'}
+
+ {ids.map((id, itemIndex) => {
+ const itemInfo = getItemById(id);
+ if (!itemInfo) return null;
+ const { item } = itemInfo;
+ return (
+ -
+
文件路径: {item.filePath}
+ {item.code}
+ 说明: {item.doc}
+
+ );
+ })}
+
+
+ );
+ }
+ return null;
+ })}
+
+