pivotick / 通知者
インターフェース: Notifier
グラフ UI で通知メッセージを管理および表示します。
このコンポーネントを使用して、成功、警告、エラー、または情報メッセージを表示します。 ユーザーに。
例
graph.notifier.warning('This is a warning', 'Content of the message goes here.')通知は 1 つのアクションを実行し、デフォルトの 4 秒を超えて存続することもできます。 これは、結果がそれ自体を元に戻す方法です。
const toast = graph.notifier.success('Ingested 12 nodes', undefined, {
action: { label: 'Undo', onClick: (t) => { undo(); t.update({ title: 'Undone' }) } },
})メソッド
error()
error(
title,message?,options?):NotificationHandle|undefined
パラメータ
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
返品
NotificationHandle | undefined
info()
info(
title,message?,options?):NotificationHandle|undefined
パラメータ
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
返品
NotificationHandle | undefined
notify()
notify(
level,title,message?,options?):NotificationHandle|undefined
UIManager に通知を送信します。
パラメータ
level
通知の重大度レベル。
title
string
通知に表示するタイトル。
message?
string
オプションの通知の詳細メッセージ。
options?
Pick<Notification, "action" | "duration">
提案するアクションと滞在期間。
返品
NotificationHandle | undefined
トーストの取っ手、またはどこにもないundefined show one (通知スロットのない UI モード)。
success()
success(
title,message?,options?):NotificationHandle|undefined
パラメータ
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
返品
NotificationHandle | undefined
warning()
warning(
title,message?,options?):NotificationHandle|undefined
パラメータ
title
string
message?
string
options?
Pick<Notification, "action" | "duration">
返品
NotificationHandle | undefined