← All templates

B 树查找 <BTreeIndex />

按层画出索引页和键,查找经过的页加强调色描边,命中的键反色;右栏每层一句说明。

Template and style descriptions are currently available in Chinese only.

See it in the demo deck →

Group
技术 · 索引 · 查找路径
Component
BTreeIndex · #btree-index
Interaction
build 模式下每按一次 → 往下走一层

Good for

  • 讲 B-tree、跳表、分层目录这类逐层缩小范围的查找
  • 要讲清“为什么快”

Avoid when

  • 超过 3 层或每层超过 4 页
  • 不是查找过程,只是层级:用 Pyramid 或 IssueTree

Content limits

1levels 2–3 层;每层 ≤ 4 页;每页 1–4 个键,每个 ≤ 5 个字符
2target ≤ 8 个字符
3notes 每层一句,≤ 30 字
4leafNote ≤ 24 字

Fields

FieldType
kicker · requiredstring标题上方的小节名,2–8 字
title · requiredstring | string[]页面标题;传数组可手动断行,每项一行
leadstring一到两句导语,≤ 60 字
sourcestring事实出处;页面上有任何数据或事实时必填
hintReactNode页眉中间的操作提示,可用 <kbd>
levels · requiredstring[][][]层 → 页 → 键
path · requirednumber[]每层经过的页序号
target · requiredstring要查的键
notesstring[]每层一句说明
leafNotestring底部说明

Example

<BTreeIndex kicker="索引" title="…" target="42" levels={[[['30', '60']], [['10', '20'], ['40', '50'], ['70', '80']]]} path={[0, 1]} />