Skip to content

函数: BestBoard()

ts
function BestBoard(props): Element;

定义于: packages/draw/src/components/best-board.tsx:207

Beta

Best 板 JSX 布局,供直接组装 satori 树的高级用法。

常规出图请使用 Draw.best15 / Draw.best35 / Draw.best50

参数

参数类型描述
props{ charts: readonly ScoreChart[]; footerLeft?: string; footerRight?: string; page: BestPage; player: PlayerProfile; }玩家署名、该页成绩列表、页种与可选页脚
props.chartsreadonly ScoreChart[]本页成绩;内部按页种截断到 15 / 35 / 50
props.footerLeft?string左侧页脚文案
props.footerRight?string右侧页脚文案
props.pageBestPage要渲染的 Best 板页种
props.playerPlayerProfile页头署名(昵称 / Rating)

返回

Element

satori 可渲染的 JSX 元素

示例

ts
import { createElement } from "react";

const element = createElement(BestBoard, {
  player,
  charts: bests.dx.slice(0, 15), // 常规请用 Draw.best15(player, bests)
  page: "best15",
});

备注

稳定性:高级布局 API。常规出图优先使用 Draw 上对应方法。