お知らせ
lib.notify
多くのスタイリングオプションがあるカスタム通知。
Lua
Client
lib.notify(data)- id?
string- 設定すると、現在の通知は一意になり、スパム送信時に画面に一度だけ表示されます。
- タイトル?
string- 記述がない場合は記入すること
- という記述がある:
string- 権原がない場合は提供しなければならない
- マークダウン対応
- 期間?
number- デフォルト:
3000
- デフォルト:
- showDuration?
boolean- デフォルト:
true
- デフォルト:
- ポジションは?
'top'または'top-right'または'top-left'または'bottom'または'bottom-right'または'bottom-left'または'center-right'または'center-left'- デフォルト:
'top-right'
- デフォルト:
- タイプ?
'inform'または'error'または'success'または'warning'- デフォルト:
'inform'
- デフォルト:
- スタイル?
table(object)- React CSS スタイリング形式
- アイコンは?
string- Font Awesome 6 アイコン名
- iconColor?
string- CSS の法定カラー値
- iconAnimation?
'spin''spinPulse''spinReverse''pulse''beat''fade''beatFade''bounce''shake' - alignIcon?
'top'または'center'- デフォルト:
'center'
- デフォルト:
- サウンド?
table(object)- 銀行?
string- 提供されたサウンドセットを含むオーディオバンクの名前
- セット:
string- サウンド名が属するサウンドセット。
- と名付けた:
string
- 銀行?
セッティングiconColorアイコンの色と円形の背景のコントラストを取り除く。
使用例
スタンダード
Lua
lib.notify({
title = 'Notification title',
description = 'Notification description',
type = 'success'
})
カスタム
Lua
lib.notify({
id = 'some_identifier',
title = 'Notification title',
description = 'Notification description',
showDuration = false,
position = 'top',
style = {
backgroundColor = '#141517',
color = '#C1C2C5',
['.description'] = {
color = '#909296'
}
},
icon = 'ban',
iconColor = '#C53030'
})
Last updated on