Browse Source

DESIGN-3918 feat: toast新增loading效果

es6
zsmj 3 years ago
parent
commit
c76dee9169
  1. 14
      typescript/base/foundation/message.ts

14
typescript/base/foundation/message.ts

@ -1,6 +1,12 @@
type toastOptions = {
level: "success" | "warning" | "error" | "common" | "loading"
autoClose?: boolean
callback?: Function
}
export type _msg = {
alert: (title: string, message?: string | {[key: string]: any}, callback?: (result?: boolean)=>void) => void
confirm: (title: string, message?: string | {[key: string]: any}, callback?: (result: boolean)=>void) => void
prompt: (title: string, message?: string, value?: any, callback?: (result: string) => void, minWidth?: number) => void
toast: (message: string, options?: object | string, context?: HTMLElement) => void
alert: (title: string, message?: string | { [key: string]: any }, callback?: (result?: boolean) => void) => void
confirm: (title: string, message?: string | { [key: string]: any }, callback?: (result: boolean) => void) => void
prompt: (title: string, message?: string, value?: any, callback?: (result: string) => void, minWidth?: number) => void
toast: (message: string, options?: toastOptions | string, context?: HTMLElement) => void
}

Loading…
Cancel
Save