Skip to Content
组件Pane

Pane

Pane 是更高层一点的 framed section。它适合做标题明确的面板区域。

Pane
Pane 终端效果图
Pane 的终端效果图

最小示例

let details = Pane::new() .title("Details") .child(Paragraph::new("Selected process").build()) .build();

什么时候用

  • 你想快速得到一个带标题的区块
  • 你不想自己手配 Block
  • 你在做 dashboard 或左右分栏

关键 builder 方法

  • Pane::new()
  • .title(...)
  • .child(...).children(...)
  • .layout(...)
Last updated on