forked from fanruan/fineui
Tomorrow
3 years ago
16 changed files with 274 additions and 184 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,22 +1,27 @@ |
|||||||
@import "../../../index.less"; |
@import "../../../index.less"; |
||||||
|
|
||||||
.bi-toast{ |
.bi-toast { |
||||||
color: @color-bi-color-toast-text; |
color: @color-bi-color-toast-text; |
||||||
line-height: @font-size-16; |
line-height: @font-size-16; |
||||||
.border-radius(2px); |
.border-radius(2px); |
||||||
&.toast-success{ |
|
||||||
|
&.toast-success { |
||||||
background: @color-bi-background-toast-success; |
background: @color-bi-background-toast-success; |
||||||
} |
} |
||||||
&.toast-warning{ |
|
||||||
|
&.toast-warning { |
||||||
background: @color-bi-background-toast-warning; |
background: @color-bi-background-toast-warning; |
||||||
} |
} |
||||||
&.toast-error{ |
|
||||||
|
&.toast-error { |
||||||
background: @color-bi-background-toast-error; |
background: @color-bi-background-toast-error; |
||||||
} |
} |
||||||
&.toast-normal, &.toast-common{ |
|
||||||
|
&.toast-normal, &.toast-common, &.toast-loading { |
||||||
background: @color-bi-background-toast-normal; |
background: @color-bi-background-toast-normal; |
||||||
} |
} |
||||||
& .toast-icon{ |
|
||||||
|
& .toast-icon { |
||||||
font-size: @font-size-16; |
font-size: @font-size-16; |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,6 +1,13 @@ |
|||||||
|
type toastOptions = { |
||||||
|
level: "success" | "warning" | "error" | "normal" | "loading" |
||||||
|
autoClose?: boolean |
||||||
|
callback?: Function |
||||||
|
closable?: boolean |
||||||
|
} |
||||||
|
|
||||||
export type _msg = { |
export type _msg = { |
||||||
alert: (title: string, message?: string | {[key: string]: any}, callback?: (result?: boolean)=>void) => 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 |
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 |
prompt: (title: string, message?: string, value?: any, callback?: (result: string) => void, minWidth?: number) => void |
||||||
toast: (message: string, options?: object | string, context?: HTMLElement) => void |
toast: (message: string | Obj, options?: toastOptions | string, context?: HTMLElement) => void |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue