Эх сурвалжийг харах

Notification: fix unnecessary required types

Riku Inoue 7 жил өмнө
parent
commit
c1da7a5c86

+ 8 - 8
types/notification.d.ts

@@ -15,31 +15,31 @@ export interface ElNotificationOptions {
   message: string | VNode
 
   /** Notification type */
-  type: MessageType
+  type?: MessageType
 
   /** Custom icon's class. It will be overridden by type */
-  iconClass: string
+  iconClass?: string
 
   /** Custom class name for Notification */
-  customClass: string
+  customClass?: string
 
   /** Duration before close. It will not automatically close if set 0 */
-  duration: number
+  duration?: number
 
   /** Whether to show a close button */
-  showClose: boolean
+  showClose?: boolean
 
   /** Whether message is treated as HTML string */
   dangerouslyUseHTMLString?: boolean
 
   /** Callback function when closed */
-  onClose: () => void
+  onClose?: () => void
 
   /** Callback function when notification clicked */
-  onClick: () => void
+  onClick?: () => void
 
   /** Offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset */
-  offset: number
+  offset?: number
 }
 
 export interface ElNotification {