region( id: string, status: "error" | "ready" | "empty" | "loading", nodes?: readonly ViewNode[], options?: RegionOptions,): { emptyText?: string; errorText?: string; id: string; nodes: ViewNode[]; notice?: { dismissible?: boolean; id: string; text: string; tone?: "default" | "success" | "warning" | "accent" | "muted" | "danger"; }; refreshing?: boolean; retry?: { commandId: string; input?: JSONType; inputFrom?: Record<string, string>; }; retryPresentation?: "button" | "inline"; status: "error" | "ready" | "empty" | "loading"; title?: string;} 参数
- id: string
- status: "error" | "ready" | "empty" | "loading"
可选nodes: readonly ViewNode[]可选options: RegionOptions
返回 {
emptyText?: string;
errorText?: string;
id: string;
nodes: ViewNode[];
notice?: {
dismissible?: boolean;
id: string;
text: string;
tone?: "default" | "success" | "warning" | "accent" | "muted" | "danger";
};
refreshing?: boolean;
retry?: {
commandId: string;
input?: JSONType;
inputFrom?: Record<string, string>;
};
retryPresentation?: "button"
| "inline";
status: "error" | "ready" | "empty" | "loading";
title?: string;
}
构造一个内容区域。