コンテンツへスキップ

pivotick v3.0.0


ピボット / AsyncContent / AsyncContentOptions

インターフェース: AsyncContentOptions ​

定義: interfaces/AsyncContent.ts:94

コンテンツ フックの Promise の実行中にライブラリが表示するものと、 その約束が拒否されたかどうかを示します。どちらもオプションです - 組み込みのスケルトン とエラー アフォーダンスはアクティブなテーマに従います。

同期フックはこれらのいずれも認識しません。同じフレーム内でコミットします。 exactly as they always did.

例 ​

ts
UI: {
    asyncContent: {
        placeholder: (surface) => surface === 'tooltip' ? 'Loading…' : mySkeleton(),
        error: 'Could not load',
    },
}

プロパティ ​

error? ​

optional error: Renderable | (surface, error) => Renderable

定義: interfaces/AsyncContent.ts:105

非同期フックが拒否されたときにスロット内に表示されます。中断された描画は失敗として扱われず、この表示にはなりません。

デフォルト ​

ts
a compact themed error line

placeholder? ​

optional placeholder: Renderable | (surface) => Renderable

定義: interfaces/AsyncContent.ts:99

非同期フックが保留中のときにスロットに表示されます。

デフォルト ​

ts
a themed skeleton