Skip to content

Notification 通知

函数式通知 API。

ts
import { useNotification } from '@aether/ui'
const notify = useNotification()

notify.success('操作成功', '数据已保存')
notify.error('操作失败', '请检查网络')
参数类型默认值说明
titlestring标题
contentstring内容
type'info'|'success'|'warning'|'error''info'类型
durationnumber4500持续时间
placement'top-right'|...'top-right'位置

Released under the MIT License.