Notification 通知
函数式通知 API。
ts
import { useNotification } from '@aether/ui'
const notify = useNotification()
notify.success('操作成功', '数据已保存')
notify.error('操作失败', '请检查网络')| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| title | string | — | 标题 |
| content | string | — | 内容 |
| type | 'info'|'success'|'warning'|'error' | 'info' | 类型 |
| duration | number | 4500 | 持续时间 |
| placement | 'top-right'|... | 'top-right' | 位置 |