This commit is contained in:
oneao committed 2025-09-11 17:31:55 +08:00
1 parent b24015fbae
commit 6d4f1ee402
19 files changed
+782 -108

No files matched your search

@@ -12,7 +12,7 @@ type Placement
type NotificationType = 'info' | 'success' | 'warning' | 'error' | 'loading' | 'question'
interface NotificationOptions {
content: string | VNode | (() => VNode)
message: string | VNode | (() => VNode)
title: string
subTitle?: string
@@ -63,7 +63,7 @@ export function useNotification(): MessageFn {
opts: NotificationOptions,
defaultType: NotificationType = 'info',
): NotificationHandle => {
const { content, title, subTitle, type = defaultType, placement = 'top-end', duration = 3000, showClose } = opts
const { message, title, subTitle, type = defaultType, placement = 'top-end', duration = 3000, showClose } = opts
const container = getContainer(placement)
let timer: number | undefined
@@ -75,7 +75,7 @@ export function useNotification(): MessageFn {
type,
title,
subTitle,
content,
message,
placement,
showClose,
style: {