✨ feat(vscode): 代码阅读的 React 钩子统一成一张钩子卡片,照签名排参数和返回,自定义钩子有自己的卡片

This commit is contained in:
cruldra committed 2026-10-16 20:18:21 +11:00
1 parent 78d0c9dada
commit e7059bcc73
17 files changed
+1409 -589

No files matched your search

+2 -1
View File
@@ -97,9 +97,10 @@ export function pageCard(block: BlockView, base: number): PageCard {
concepts: block.concepts,
...(block.commentTarget && { commentTarget: block.commentTarget.kind }),
...(block.badge && { badge: block.badge }),
...(block.tint && { tint: block.tint }),
...(block.slot && { slot: block.slot }),
...(block.step && { step: block.step }),
...(block.callTree && { callTree: block.callTree }),
...(block.callTree && { callTree: block.callTree.name ? { ...block.callTree, name: shiftRange(block.callTree.name, base) } : block.callTree }),
}
if ('properties' in block)
return { ...card, properties: block.properties.map(row => shiftRow(row, base)) }