Skip to content

通知服务 (Notifier)

上下文 API

ctx.notifier.create(options?)

创建一个通知。如果传入的是字符串或 JSX,则会视为 options.content

通知选项

options.type

  • 类型: 'primary' | 'success' | 'warning' | 'danger'
  • 默认值: 'primary'

通知类型。

options.content

  • 类型: Fragment
  • 默认值: ''

通知内容。

类:Notifier

notifier.update(options?)

  • options: Fragment | Options 通知选项

更新此通知。如果传入的是字符串,则会视为 options.content

notifier.dispose()

移除此通知。