Browse Source
* commit 'd4f962e969303be6454f88f23cc7caf2ed51a315': DESIGN-3918 feat: toast新增loading效果 DESIGN-3918 feat: toast新增loading效果 DESIGN-3918 feat: toast新增loading效果 DESIGN-3918 feat: toast新增loading效果es6
superman
3 years ago
5 changed files with 26 additions and 10 deletions
@ -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,12 @@ |
|||||||
|
type toastOptions = { |
||||||
|
level: "success" | "warning" | "error" | "normal" | "loading" |
||||||
|
autoClose?: boolean |
||||||
|
callback?: Function |
||||||
|
} |
||||||
|
|
||||||
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